crabviz icon indicating copy to clipboard operation
crabviz copied to clipboard

CrabViz not showing graph

Open toumorokoshi opened this issue 1 year ago • 16 comments

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.

toumorokoshi avatar Oct 16 '23 20:10 toumorokoshi

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

nicholasmullikin avatar Nov 12 '23 03:11 nicholasmullikin

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.

toumorokoshi avatar Nov 15 '23 07:11 toumorokoshi

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.

nicholasmullikin avatar Nov 15 '23 15:11 nicholasmullikin

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

chanhx avatar Dec 04 '23 14:12 chanhx

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'

ishigoemon avatar Dec 22 '23 17:12 ishigoemon

@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.

chanhx avatar Dec 24 '23 08:12 chanhx

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

cumtWangJin avatar Mar 28 '24 06:03 cumtWangJin

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?

chanhx avatar Mar 28 '24 07:03 chanhx

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)

hartvon avatar Apr 07 '24 02:04 hartvon

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.

chanhx avatar Apr 07 '24 04:04 chanhx

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

mukundhk avatar May 23 '24 04:05 mukundhk

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.

chanhx avatar May 25 '24 02:05 chanhx

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.

mukundhk avatar May 26 '24 20:05 mukundhk

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?

chanhx avatar Jun 19 '24 14:06 chanhx

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

cbreins avatar Sep 11 '24 21:09 cbreins

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 avatar Sep 12 '24 08:09 chanhx