chanhx / crabviz

🦀 A LSP-based interative call graph generator
Apache License 2.0
666 stars 21 forks source link

CrabViz not showing graph #20

Open toumorokoshi opened 10 months ago

toumorokoshi commented 10 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 8 months ago

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

ishigoemon commented 8 months ago

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 commented 8 months ago

@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 commented 5 months ago

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 commented 5 months ago

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 commented 4 months ago

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 commented 4 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 2 months ago

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?