New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get syntax highlighting in the Source module when using venv? #318
Comments
Does the commands in this wiki page work? They need to be executed within GDB. Also what's the output of the following?
|
Hi @cyrus-and, Here is the output:
I tried the commands in this wiki page and error To make sure that I didn't forget to install pygments, I created a test.py file: from pygments.styles import *
for style in get_all_styles():
print(style) It runs successfully:
|
In a nutshell, Pygments must be available for the version of Python that runs inside GDB (in your case 3.11.2). |
Hi @cyrus-and, Thank you so much! I was not familiar with Python integration in GDB and now I see where the problem is. I didn't install Pygments system-wide, because the reason listed here. In the Quickstart section of README.md of gdb-dashboard, it says we can install Pygments by I'm very confused. Even if I run Is there anything wrong with my understanding? I really appreciate it if you can correct me. By the way, Python version in my system and in the venv are also 3.11.2:
|
OK so, the question is then, how to use Pygments in Python GDB using But if you want to use
So in GDB (this is the part that should be in your configuration file, something inside
After that, you should be able to import Pygments and all of that. Hope it helps! |
Thank you for the informative answer! It really helps me a lot! |
Feel free to post your exact solution so to help others, if you want. |
OS: Debian 12
I'm trying to use
gdb-dashboard
for the first time. I have installedPygments
as mentioned in the README.In the
Output/messages
module, syntax highlighting looks good:However, in the
Source
module, there is no syntax highlighting:Do I need to add any configuration to get syntax highlighting in the
Source
module?Thank you so much for creating this amazing tool!
The text was updated successfully, but these errors were encountered: