0

I am used to debugging in RStudio. Using R I simply use the command: debug(my_function), then run the code and automatically the script debugs at my_function.

Now I am using Python in VS Code, I see debugging is possible by setting breakpoints visually using the red dots. However I need to debug a function without actually knowing where this function is stated. So my question is can I debug a specific function in VS Code using a command?

I hope to use something like this command line -> debug(my_function)

Thanks!

2 Answers 2

1

It looks impossible for now, I have submitted a feature request on GitHub.

Maybe you can try to copy the function into an isolated python file to debug it for now.

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

2 Comments

much appreciated!
@Jelle Jansen You are welcome.
1

They are called Function Breakpoints

A function breakpoint is created by pressing the + button in the BREAKPOINTS section header and entering the function name. Function breakpoints are shown with a red triangle in the BREAKPOINTS section.

1 Comment

This is a nice way to approach it!

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.