continue icon indicating copy to clipboard operation
continue copied to clipboard

Debug(locals/globals/callstack/etc.) Context Provider Request

Open commandblock2 opened this issue 1 year ago • 2 comments

Validations

  • [X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • [X] I'm not able to find an open issue that requests the same enhancement

Problem

It would be really nice to have providers that can provide contexts in the debugging tab, which may help the LLM spot errors in code or under the code. For example @locals will provide the context of all the local variables and their value in (shorted) string form with code around the current breakpoint.

image

Solution

Maybe similar to the IDE console one?

commandblock2 avatar Feb 01 '24 13:02 commandblock2

@commandblock2 I love this idea, it would be incredibly helpful. Might even be nice to show some of the code context from up the call stack (e.g. function bodies at each level within your code).

Without a doubt we'd want to build this, but probably won't get to it this week. Not that I want to push this at all, but if you happened to be super excited about it, we have some docs on contributing context providers here, and I think this one wouldn't be overly complicated. You'd just have to dig a little bit into the VS Code debugging APIs (something along the lines of vscode.debug.sendCustomRequest)

sestinj avatar Feb 01 '24 21:02 sestinj

I will look into the docs once I got some freetime probably next week, and see what I can do about it. Not sure how much I can help this but I'll try.

commandblock2 avatar Feb 02 '24 03:02 commandblock2

@commandblock2 Just came across this issue, and realized it can now probably be closed. Thanks for the awesome work here!

I actually found myself using it multiple times yesterday, was much more convenient than highlighting all the way up the stack

sestinj avatar Mar 20 '24 23:03 sestinj