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.

Emphasize development and debug utility of ipy command

See original GitHub issue

The utility of the optional ipy command combined with self.self_in_py = True for developers is truly phenomenal. We don’t do these amazing features justice in our documentation and I’m not sure how discoverable they are for new cmd2 developers. These features open the door to an enhanced development experience that allows easy experimenting as well as the ability to do some after-the-fact debugging when things don’t behave like you think they should.

We should add a section on “Developer Tips” or something like that to our documentation.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
tleonhardtcommented, Mar 3, 2021

I like the concept of putting this in the basic oookiecutter template: https://github.com/jayrod/cookiecutter-python-cmd2/issues/10

We can probably also update our documentation a little to emphasize just how darn useful ipy is for debugging.

0reactions
kmvanbruntcommented, Jan 2, 2022

In both py and ipy shells, you can do everything that’s possible in a pyscript. Therefore, you don’t need to call self.do_foo(). Just use app('foo arg1 arg2').

These shells offer a lot for debugging. I commonly do the following operations:

  1. Check application state via self object.
  2. Alter application state via self object to simulate various conditions.
  3. Run commands via app command to see what’s returned in the CommandResult object.

I also use run_pyscript for debugging. Recently I wrote a pyscript which rewrites a do_* command function while the application is running. That way I don’t have to keep closing and reopening the application to test my code changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing IPython — IPython 3.2.1 documentation
This can be an efficient way to develop and debug code, in many cases eliminating the need for print statements or external debugging...
Read more >
Step-by-step debugging with IPython
Using IPython by embedding an IPython shell in your code. You can do from IPython import embed , and then use embed() in...
Read more >
How to Develop and Debug using XSCT - Xilinx
Learn how to develop and debug using XSCT, Xilinx Software Command -Line Tool. The video demonstrates how the XSCT acts as a Command...
Read more >
Debug Intel® FPGA Hardware with System Console
You can use tab completion to finish commands as you type them, and even show you what possible commands can complete from the...
Read more >
Debugger — Spyder 5 documentation
Spyder's debugger offers syntax highlighting, code completion and command history, which work exactly like they do in the normal interactive interpreter. Use ......
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