question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Startup script for debugger

See original GitHub issue

Is it possible to set one? I have functions useful for debugging that I placed in Preferences > IPython console > Startup > Run a file, but they’re are undefined in ipdb>. Further, running debugger appears to undo the startup script; I can access functions before running debugger, but not after (unless I restart kernel).

I figure this isn’t as simple due to debugger namespace scoping, so I suppose the question’s rather whether there’s a way to define global functions - but that IPython “forgets” the startup script after debugging remains unclear to me.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
impact27commented, May 20, 2020

@OverLordGoldDragon Do you know the Pbd pp command? https://docs.python.org/3/library/pdb.html#pdbcommand-pp . This might get you a similar result

1reaction
impact27commented, May 19, 2020

Something like https://github.com/spyder-ide/spyder/pull/10542? I really like this PR 😃 I use it to load matplotlib and numpy in every frame I debug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting/debugging startup script - TechNet
Logging into the machine and running the script manually works fine. I tried adding ">C:\Apps\results.log" as a Script Parameter (image included ...
Read more >
2.3. Debugging Bash scripts
Bash provides extensive debugging features. The most common is to start up the subshell with the -x option, which will run the entire...
Read more >
Starting a debugging session from the command line - JetBrains
You can start debugging a PHP CLI script from the command line, having PhpStorm listen for incoming debugger connections.
Read more >
Startup (Debugging with GDB) - sourceware.org
Performs minimal setup required to initialize basic internal state. · Reads commands from the early initialization file (if any) in your home directory....
Read more >
Debugging scripts (FileMaker Pro Advanced)
Debugging scripts (FileMaker Pro Advanced) · 1. To enable the Script Debugger, choose Tools menu > Script Debugger. · 2. Run your script....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found