Skip to content
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

CrabViz not showing graph #20

Open
toumorokoshi opened this issue Oct 16, 2023 · 16 comments
Open

CrabViz not showing graph #20

toumorokoshi opened this issue Oct 16, 2023 · 16 comments

Comments

@toumorokoshi
Copy link

I'm trying to run CrabViz, and I'm not getting a visualization. I do the following:

  1. right-click a directory on the left hand nav
  2. Click "CrabViz: generate call graph"

And nothing happens. CrabViz does briefly pop up with "loading languages" but that's about it.

I'm happy to debug, but not sure about how to do so. Are there instructions on how to do so?

I'm using VSCode with the SSH plugin, if that changes anything.

@nicholasmullikin
Copy link

I was also having problems with nothing happening. I was getting an error "Document symbol information not available" which I was able to solve by making sure the vscode.executeDocumentSymbolProvider would actually return something. For rust, I just had to install rust-analyzer. Not sure if this is the error that you're running into though

@toumorokoshi
Copy link
Author

Where did you see the error? in my case I was trying to use it for Python - so not sure what issues there are with different languages.

It's an amazing idea though! hoping to leverage it somehow.

@nicholasmullikin
Copy link

It showed up as a small pop-up and staying the notification area until I cleared it / restarted vscode. I just tried it for python and was able to get it to work, but I had to have every file I wanted a call graph of open (presumably so vscode would generate the symbol information) I used ms-python.pylint for python.

@chanhx
Copy link
Owner

chanhx commented Dec 4, 2023

Crabviz stops working if no language was detected. Please use the Developer: Show Running Extensions command to see where Crabviz is running.

@ishigoemon
Copy link

I'm seeing similar behavior. In the "Extension Host" output, I get this on Linux, with a rust workspace:

2023-12-22 12:36:30.153 [info] ExtensionService#_doActivateExtension chanhx.crabviz, startup: false, activationEvent: 'onCommand:crabviz.generateCallGraph'
2023-12-22 12:37:05.322 [error] Error: ENOENT: no such file or directory, open '/Users/chanaetern/Desktop/Repositories/Rust/crabviz/editors/code/node_modules/@hpcc-js/wasm/dist/graphvizlib.wasm'

@chanhx
Copy link
Owner

chanhx commented Dec 24, 2023

@ishigoemon Thank you very much for reporting this. I just released a new version 0.3.1 solving this problem. Please update and try it out.

@cumtWangJin
Copy link

The same problem occurs when I click on "CrabViz: generate call graph". So I try to degrade the version from v0.4.0 to v0.3.2,it works fortunately. And the version of the VSCODE is version 1.85.2

@chanhx
Copy link
Owner

chanhx commented Mar 28, 2024

The same problem occurs when I click on "CrabViz: generate call graph". So I try to degrade the version from v0.4.0 to v0.3.2,it works fortunately. And the version of the VSCODE is version 1.85.2

Are there any error logs from "Extension Host"? What platform is it running on? Windows, macOS, or Linux?

@hartvon
Copy link

hartvon commented Apr 7, 2024

Description:
Same problem as above. No graph showing and no any log output from "Extension Host(Remote)" when I try to generate call gragh from the files or folders. But it worked when I try to generate a call graph for the selected function.

Environment:
VS Code: 1.87.2
Remote OS: CentOS 7.9.2009 (glibc 2.17)

@chanhx
Copy link
Owner

chanhx commented Apr 7, 2024

Description: Same problem as above. No graph showing and no any log output from "Extension Host(Remote)" when I try to generate call gragh from the files or folders. But it worked when I try to generate a call graph for the selected function.

Environment: VS Code: 1.87.2 Remote OS: CentOS 7.9.2009 (glibc 2.17)

Thank you for the detailed report. I have not tested the new version on remote development, will look into this issue later.

@mukundhk
Copy link

mukundhk commented May 23, 2024

Crabviz stops working if no language was detected.

@chanhx can you tell me how to add new languages? Also, what are the current languages that are supported? I love your project btw, it will definitely be adding improvements to my workflow

@chanhx
Copy link
Owner

chanhx commented May 25, 2024

I love your project btw, it will definitely be adding improvements to my workflow

Thank you!

what are the current languages that are supported?

After v0.4.0, Crabviz reads extension manifests to know what languages are supported in VS Code, and it can generate call graphs for all those languages (except some languages in the ignore list, like xml, toml, css etc). So it depends on what languages are supported in your VS Code.

can you tell me how to add new languages?

If you want supports for new languages, just install the corresponding language extensions in your VS Code.

@mukundhk
Copy link

If you want supports for new languages, just install the corresponding language extensions in your VS Code.

I have tried using the extension on both react+typescript projects and in python. I am unable to generate a function call graph from right clicking the src folder on the sidebar. it only works when i run the command after right clicking on a function inside a specific file.

React and typescript is supported by default on vscode and i have installed all the language extensions for python. i am not sure of what the issue is. All i get is "detecting languages" in the bottom right and nothing else.

@chanhx
Copy link
Owner

chanhx commented Jun 19, 2024

I have tried using the extension on both react+typescript projects and in python. I am unable to generate a function call graph from right clicking the src folder on the sidebar. it only works when i run the command after right clicking on a function inside a specific file.

So sorry for the late reply. I can't reproduce the bug, maybe it's platform-related, like #27. What's your OS? And the version of VS Code? Do you use the extension in remote development?

@cbreins
Copy link

cbreins commented Sep 11, 2024

I was able to reproduce this bug exactly as described above with v0.4.0 with the extension installed inside a Linux devcontainer with python3.8 code running an an Ubuntu 22.04 system. Hope that helps

@chanhx
Copy link
Owner

chanhx commented Sep 12, 2024

I was able to reproduce this bug exactly as described above with v0.4.0 with the extension installed inside a Linux devcontainer with python3.8 code running an an Ubuntu 22.04 system. Hope that helps

Thanks for the information. I will try to reproduce the bug and fix it.

@chanhx chanhx mentioned this issue Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants