cancel
Showing results for 
Search instead for 
Did you mean: 

VSCode Debugger Breakpoints jump

bibble235
Associate III

Hi

I am having problems setting breakpoints when using the debugger in VS Code. I can step through manually but cannot seem to set breakpoints. Before starting to debug I can add a breakpoint at 50

bibble235_1-1714222278230.png

But when I run the code the breakpoint changes to a different line number outside of the loop line 54. Removed the target and reflashed in case the code is out of sync but do not understand. 

If I attempt to add a breakpoint in says

bibble235_2-1714222427049.png

New install (because 24.04 came out) but it did not work on the old install either.

Thanks all - as ever

1 ACCEPTED SOLUTION

Accepted Solutions

Is this built with or without optimization?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3
bibble235
Associate III

I think this maybe me. Noticed 

[profile.dev]
opt-level = 3

 In my code. When at PC will check

Is this built with or without optimization?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
bibble235
Associate III
[profile.dev]
opt-level = 0

Setting to no optimization in Cargo.toml and all works.