Giter Site home page Giter Site logo

Comments (5)

hediet avatar hediet commented on April 28, 2024

That's a pretty good idea! However, it might reduce the incentive to add proper support for all the specific debug adapters (which I think is fine).

I'm not a C++ guy and lldb/gdb are rather alien to me. I'm very curious in which ways these evalTemplates would be used and what could be achieved by them. It would be awesome if these use-cases or setups could be collected in this repository.

For what do you need the differentiation between watch or repl contexts though? The extension always uses the watch context, as the repl context sometimes is more verbose, making the result unparsable.

Oh, by the way, thanks for your great lldb vscode extension ;)

from vscode-debug-visualizer.

vadimcn avatar vadimcn commented on April 28, 2024

it might reduce the incentive to add proper support for all the specific debug adapters (which I think is fine).

If templates are configurable, others will be able to create them and contribute back to your repo. Otherwise, in order to add a new debugger, one would have to fork and build your extension, which raises the bar considerably.

For what do you need the differentiation between watch or repl contexts though?

In the case of lldb extension, debugger commands may be executed only in "repl" context. Other debuggers may have this as well, so IMO, it'd be best to let developers choose the context.

from vscode-debug-visualizer.

hediet avatar hediet commented on April 28, 2024

There is now the configuration option debugVisualizer.debugAdapterConfigurations in 0.13.0:

"debugVisualizer.debugAdapterConfigurations": {
	"type": "object",
	"additionalProperties": {
		"type": "object",
		"properties": {
			"expressionTemplate": {
				"type:": "string",
				"description": "A template for the final expression sent to the debugger for evaluation. Use `${expr}` to refer to the currently visualized expression."
			},
			"context": {
				"type": "string",
				"enum": [
					"watch",
					"repl"
				],
				"description": "The context to use for evaluating the expression."
			}
		}
	}
}

from vscode-debug-visualizer.

hediet avatar hediet commented on April 28, 2024

Closing as this should solve your use case.

from vscode-debug-visualizer.

hediet avatar hediet commented on April 28, 2024

Hey @vadimcn! Which context do you think should be used by default for evaluating expressions?
I used to chose watch as default, but many debug adapters truncate long strings, so I switched to repl. But for repl, the print command of lldb wraps the result in some other text. Also, having to use the print command is confusing.

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.