0

Backgroud:

  • I am using VS code. I am trying to run a python project.
  • I am on Ubuntu 18, Python 3.6 anaconda installation.

Issue:

I set a breakpoint in another file which has a function that is being called in my main file and in the debugging mode, VS code doesn't stop at all on the breakpoint.

How can I set a breakpoint in another file that is not the main.py?

Additional:

I had another question, how can I get command line arguments when running a program in debugging mode? Is hardcoding the only option?

1 Answer 1

1

Clicking in the gutter to set a breakpoint in another file should work. Make sure the code is actually being executed and that you are running the latest version of the extension.

As for setting arguments, see the debugging docs and specifically the section on args for your launch.json.

Sign up to request clarification or add additional context in comments.

1 Comment

Unfortunately that's not enough information to help. Are you setting breakpoints in files that are not in your workspace but instead in your site-packages? If so then that's on purpose as you can't traverse into library code (yet; we are planning to add a setting to let you).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.