I'm having a weird problem where breakpoints that are currently hit are not fully highlighted, which causes them to be only partially evaluated. See image below. The statement the debugger is on returns true. However, the debugger does not go past 'products' and thus it goes to the end of the if statement. It can happen to any line of code regardless of length. Also, the point at which the highlighting drops off is random, sometimes it will only highlight the first letter.
Example:
I use Attach to Process (on all w3wp.exe instances) for this project. When not debugging the whole line is highlighted as it should be.
I have tried the following:
I'm not sure what I'm missing here.
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.
If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.
About Breakpoints A breakpoint is a location in your script or keyword test where you want the script or test to pause during execution. Once execution is paused, you can check the state of the test, its output and its variables. Breakpoints only function if the Enable Debugging item of the Debug toolbar is checked.
This happens when Visual Studio is stepping through compiled code that does not match the source code displayed in the IDE. Among other things, the generated pdb tells VS how long an individual line of code is in order to properly highlight it on a breakpoint; the "incomplete highlighting" indicates that VS is executing a line of code with a different length than the actual line indicated. You need to completely clean and rebuild everything. I know you indicated that you tried that, but something is persisting or not being built correctly.
You can also try going to Debug > Options and Settings, checking "Require source files to exactly match the original version", and building/running again. This should be additional confirmation that there is a mismatch between what you're looking at and what's being compiled.
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