vscode-ocaml icon indicating copy to clipboard operation
vscode-ocaml copied to clipboard

Evaluate a' during debug

Open db4 opened this issue 8 years ago • 4 comments
trafficstars

Hovering over a variable with trailing single quote (like a') does not work properly: a is evaluated instead. I suppose it's vscode debug engine passing the wrong name to evaluateRequest() but maybe it can be tuned to handle OCaml variable names correctly? initializeRequest() or something like that?

A related problem is that one cannot evaluate record fields like a.b. Besides problems with hovering engine it also requires some changes in the value parser to work even in a watch: ocamldebug responds in that case with "$<number> : <type> = <value>" where $<number> is a temporary id, not acceptable for the current parser.

db4 avatar Aug 15 '17 08:08 db4

@db4 The a' problem is that vscode doesn't use language's wordPattern to extract expression. See https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/debug/electron-browser/debugHover.ts#L139 The a.b is fixed.

hackwaly avatar Aug 16 '17 01:08 hackwaly

@hackwaly

The a.b is fixed.

Great, thanks a lot!

The a' problem is that vscode doesn't use language's wordPattern to extract expression.

I see. Maybe it's worth a bug report or feature request to vscode team?

db4 avatar Aug 16 '17 06:08 db4

Maybe it's worth a bug report or feature request to vscode team?

Yes, it is.

hackwaly avatar Aug 16 '17 06:08 hackwaly

Alas, the vscode team won't fix https://github.com/Microsoft/vscode/issues/32873 in the foreseeable future. So you can close the issue.

db4 avatar Aug 29 '17 05:08 db4