I am able to connect to the remote machine and debug and see the source code, but when I set a break point Visual Studio don't break on it.
So is there something that needs to be done?
Or is it simply not possible to use breakpoints while remote debugging?
You can attach the Visual Studio debugger to a running process on a local or remote computer. After the process is running, select Debug > Attach to Process or press Ctrl+Alt+p in Visual Studio, and use the Attach to Process dialog to attach the debugger to the process.
To set a breakpoint in source code: Click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.
In Solution Explorer, right-click the project and choose Properties. In the side pane, choose Build (or Compile in Visual Basic). In the Configuration list at the top, choose Debug or Release. Select the Advanced button (or the Advanced Compile Options button in Visual Basic).
Breakpoints. Breakpoints can be toggled by clicking on the editor margin or using F9 on the current line. Finer breakpoint control (enable/disable/reapply) can be done in the Run and Debug view's BREAKPOINTS section. Breakpoints in the editor margin are normally shown as red filled circles.
Yes it is. You need to make sure that the PDB (debug information with line info) is present and loaded in the debugger when connecting to the remote site, because without it the debugger cannot associate source lines to bytecode offsets, which is required to set a breakpoint.
The quick answer is yes, however there are a number of different things that might be stopping the break point from being triggered. Long ago I posted this checklist as an answer to another question, it might help you now:
Why does my C# debugger skip breakpoints?
In particular check to see if the graphic for the breakpoint is solid (indicating that the breakpoint should be hit if you reach it) or if the breakpoint is just an empty circle with a little exclamation mark next to it - if you get the exclamation mark then check the tool tip you get when you hover over it, it might tell you what the problem is.
Finally, its perfectly possible to debug a RELEASE build, however you need to make sure that you produce symbols when you build - these can either be in an external file (a .pdb), or sometimes they can be embedded into the assembly itself (although I've never done this myself)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With