Code Monkey home page Code Monkey logo

Comments (5)

hediet avatar hediet commented on April 28, 2024

Thanks for your issue report ;)

I guess this is because the python debug adapter truncates the result which leads to a JSON syntax error... Can you figure out the max length of a string (in characters) when the debug adapter shortens the string? Maybe this constant can be found in the source. The context parameter is used to indicate watch, repl or copy mode - depending on the context, different truncating strategies are used. Each debug adapter handles this differently though.

Also, I'm unsure whether this is the right solution if you want to plot millions of points :D
This extension is not (yet) optimized for large visualization data - there are many inefficiencies (the data is first extracted by the python debugger, then sent to vscode, then sent to the vscode extension, then serialized, sent to the webview, then deserialized, validated and finally processed by plotly).

May I ask what your usecase is?

from vscode-debug-visualizer.

hediet avatar hediet commented on April 28, 2024

Nevermind, it is reasonable quick (less than 10 seconds):

86859a70-a333-4a90-ae4d-aaa026aee2a4

from vscode-debug-visualizer.

aganders3 avatar aganders3 commented on April 28, 2024

Thanks for the quick response.

May I ask what your usecase is?

I can't go into too many details, but basically we use matplotlib to visualize plots of long time-series of USB commands (5-10 min worth with many commands/second) during debugging. This is clumsy if using the VSCode Remote - Containers extension to use Docker as a local development environment because you have to do some kind of X-forwarding from inside the Docker container to the host. We can save static images using matplotlib but

The workaround I had was to run a simple Python http server in the container, and write JSON files via the debugger to plot in using plotly.js (trying to also avoid adding dependencies). ~10s is about the performance I was getting with this method as well, but this also required opening a browser and navigating to localhost:8888/basic_plot.html or something. Having this in the debugger is cleaner even if the speed is the same, plus the ability to use it for visualizing other objects will come in handy.

from vscode-debug-visualizer.

hediet avatar hediet commented on April 28, 2024

You could significantly speed up rendering if you render the data to a png image that you then load as base64 encoded string in python. The extension can visualize base64 encoded png strings ;)

from vscode-debug-visualizer.

aganders3 avatar aganders3 commented on April 28, 2024

I'm planning to use that feature as well! For this we really like having interactive plotting, though, because it's useful to zoom in to the ms/ยตs level. I could also implement this with a time-window before serializing to JSON, but that's not as nice as the GUI zoom.

from vscode-debug-visualizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.