Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic jump to source? (Read 4491 times)
hobstructor
Junior Member
**
Offline


Posts: 17
Joined: Oct 16th, 2012
jump to source?
Dec 31st, 2013 at 2:13pm
Print Post  
I can't get the "jump to source" on breakpoint to work.

Let's see if i understood it correctly first.

I want the cursor to jump to the line in the code where the CPU halted due to a breakpoint.... and hightlight that row. (like in normal Visual Studio).

- checked "jump to source"
- is in debug-mode
- i've already set a breakpoint + "when hit"-> continue on execusion unchecked

Anything else i should check?


  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: jump to source?
Reply #1 - Dec 31st, 2013 at 2:27pm
Print Post  
Hi there,

"Jump to source" probably isn't the option you want. That simply allows the Arduino to continue in Trace (non-break) mode but at the same time highlighting and making active the source code of the last breakpoint to be hit. This is useful for teachers, armed with a sensor or button, to demonstrate how code flow works. The option can also be switched on/off during a debug session without need for re-compile which is why it is located on the running debugger menu instead of in the project properties.

The option I think you want is in the project properties called:-
Code
Select All
  "Micro Debug>Enable Break/Pause" = True 



By default the debugger is in Trace only mode which prevents the robots and drones of some new users from crashing when a breakpoint is hit. Switching this property to True, causes the Arduino to stop at a breakpoint and wait for a debugger "Continue" command. 

You have set the other properties correctly.
« Last Edit: Dec 31st, 2013 at 2:29pm by Tim@Visual Micro »  
Back to top
IP Logged
 
hobstructor
Junior Member
**
Offline


Posts: 17
Joined: Oct 16th, 2012
Re: jump to source?
Reply #2 - Jan 1st, 2014 at 2:54pm
Print Post  
Tim@Visual Micro wrote on Dec 31st, 2013 at 2:27pm:
Hi there,

"Jump to source" probably isn't the option you want. That simply allows the Arduino to continue in Trace (non-break) mode but at the same time highlighting and making active the source code of the last breakpoint to be hit. This is useful for teachers, armed with a sensor or button, to demonstrate how code flow works. The option can also be switched on/off during a debug session without need for re-compile which is why it is located on the running debugger menu instead of in the project properties.

The option I think you want is in the project properties called:-
Code
Select All
  "Micro Debug>Enable Break/Pause" = True 



By default the debugger is in Trace only mode which prevents the robots and drones of some new users from crashing when a breakpoint is hit. Switching this property to True, causes the Arduino to stop at a breakpoint and wait for a debugger "Continue" command. 

You have set the other properties correctly.



Thanx Tim..
I had already set "Enable BReak/pause", but forgot to mention that in my post.

The problem is that i don't see anywhere if the debugger has stopped on a breakpoint or is still running. I thought, like in a normal visual Studo environment, that the row would be highlighted upon breakpoint.
 
How and where do i see where in the code we are at the moment, without using Print-text in the breakpoint/when hit.

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: jump to source?
Reply #3 - Jan 1st, 2014 at 4:23pm
Print Post  
Okay so you are saying that it is stopping/breaking but you want to know how to see the line of code that it has stopped on?

1)
Visual Micro will activate (or open) the correct source code file,  set the cursor to the line of code and select/highlight the text of the line.

2)
The Micro Trace output window will show the function name and code file name etc. You can also click the BUG button on the serial viewer and tick messages to appear in the Micro Trace. This will give a combined trace/message view instead of the default individual views.

Are you seeing this behavior?

Thanks

ps: It will not use the standard highlight that VS normally uses for debug because VS does not know it is debugging.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint