Re-add Execute/Debug in Interactive context menu#1913
Conversation
|
This seems to address #1633. Debugging the extension doesn't work for me (VS Experimental instance crashes); but I managed to check these commands by deploying to FSharpDev hives. |
|
Tagging @KevinRansom to take a look at this. |
Yes, it crashes for me every time, too, even on fresh windows installation. So I |
|
The CI is a bit borked right now and we are in the middle of an office move. Kevin |
|
@dungpa This looks fantastic. I was half way through a botched attempt to learn how to write the same code. I'll take a look at the CI problems, then we can merge this |
dsyme
left a comment
There was a problem hiding this comment.
Just a few questions, the code ooks basicaly fine and I assume is exactly the sort of thing that's already in VFPT quite a lot.
There was a problem hiding this comment.
How do you know NextTarget is not null?
There was a problem hiding this comment.
If 'addCommandFilter' is executed, NextTarget won't be null. I added explicit null check in the latest commit to avoid misuse.
There was a problem hiding this comment.
Likewise, what if NextTarget is null?
There was a problem hiding this comment.
I don't know QueryStatus/Exec well, but I guess it's alright to assume there is always exactly one element in prgCmds?
There was a problem hiding this comment.
I only encountered one-element prgCmds but one can't guarantee that. I made a relevant change in cd94a4e.
There was a problem hiding this comment.
Why do we need IsAdded? Looking at the logic the command filter has only just been freshly created in any case?
Rudimentary implementation
9b5459a to
cd94a4e
Compare
|
|
||
| member x.QueryStatus (pguidCmdGroup, cCmds, prgCmds, pCmdText) = | ||
| if pguidCmdGroup = VSConstants.VsStd11 then | ||
| for i = 0 to int cCmds-1 do |
There was a problem hiding this comment.
It is safe to assume only one command in practice, but this won't hurt.
* Hook F# Interactive menu commands into language service Rudimentary implementation * Refactor * Refactor again for better robustness
I installed VS 2017 RC today and found out that Execute/Debug in Interactive commands didn't work. So I made a quick fix to re-enable those commands for F# interactive.