How to use debug to modify the code

When I return with debug, it shows 'Debug location is approximate because the source is not available'. And when I press the continue in Console, it just jump out of the debug page. So I don't know where to modify to make the program run.
return with debug

  1. If you want the debugger to have accurate positioning, the file which you're debugging needs to be saved... if you are working in a new file which hasn't been saved you may end up in the wrong place.
  2. While you can edit code in the debugger, it is only valid for the debugging session, so that's not really what it's for. It's more so you can easily step through the code and see what your object values are so you can identify where your reality diverged from your expectations.
  3. You likely don't want to press c to continue, you want to press n to move to the next command or s to step into a nested function call. c will just resume running the code and you'll almost certainly just hit the same error again.

After you figure out what is causing the error in the debugger, you'll need to make the actual changes in your source file.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.