Rafael
Rafael

Reputation: 671

How to set breakpoints & command line arguments in VS code debugging mode?

Backgroud:

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?

Upvotes: 0

Views: 1234

Answers (1)

Brett Cannon
Brett Cannon

Reputation: 16100

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.

Upvotes: 1

Related Questions