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.

Cygdb not working with recent virtualenvs

See original GitHub issue

In recent Python virtualenvs, there is no activate_this.py file.

Cygdb therefore fails to load:

Reading symbols from python3-dbg...done.
gdb command file: Activating virtualenv: /home/myuser/.virtualenvs/myenv; path_to_activate_this_py: /home/myuser/.virtualenvs/myenv/bin/activate_this.py
Traceback (most recent call last):
  File "<string>", line 8, in <module>
FileNotFoundError: [Errno 2] Aucun fichier ou dossier de ce type: '/home/myuser/.virtualenvs/myenv/bin/activate_this.py'
/tmp/tmpohzn6ela:19: Error in sourced command file:
Error while executing Python code.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
seiliscommented, Mar 18, 2021

Recently ran into this issue setting up cygdb in an existing environment that uses venv extensively. What’s required to push through the fix? The last comments on the PR date from last September.

If some help is needed, I can jump in.

0reactions
scodercommented, Jul 1, 2019

PR welcome that fixes this. Even one that resolves it only for Py3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use gdb python debugging extension inside virtualenv
I've solved the problem by using strace on gdb, grepping the "open" syscalls. It seems that gdb makes a search for python-gdb.py in...
Read more >
virtualenv'ed python-dbg doesn't work smoothly with gdb (py ...
Debian Bug report logs - #868055 virtualenv'ed python-dbg doesn't work smoothly with gdb (py- commands are gone). version graph. Package: python ...
Read more >
Using Python PyPi Packages within GDB/LLDB - Interrupt
In this post, we will discuss how to properly setup GDB, Python, and optionally virtualenv and then modify the uuid_list_dump command from the ......
Read more >
pwnlib.gdb — Working with GDB - Pwntools
attach() - Attach to an existing process ; debug() - Start a new process under a debugger, stopped at the first instruction ;...
Read more >
C Extension debugging on Linux, with gbd/valgrind. - Pillow
If the python stack isn't working in gdb, then set debug auto-load can also be helpful in .gdbinit . Make a virtualenv with...
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