Replies: 1 comment
-
Thanks for giving these APIs a try! This is an advanced use case and we'd love any feedback you have. As you can see the API is still pretty rough. If you attach the debugger to your kernel's host process and break on all exceptions, are you seeing anything thrown when the I'm currently doing a good deal of reorganizing of this code and fixing some command handling and routing bugs along the way, which might (I can't tell for sure) address some of the issues you're hitting. The WPF sample did work for completions from the remote kernel at one point and I'm wondering if that broke somewhere. I've fixed a few completion and hover text issues through proxy kernels and I'm experimenting with ways to make the kernel connection a little easier to wire up. The PR should be ready before too long and I'd be interested in seeing if it stabilizes this for you. |
Beta Was this translation helpful? Give feedback.
-
The package and version I'm asking about:
Question
Background: I am evaluating interactive notebooks for my team's workflow, which currently involves using f# interactive and .fsx files (as pseudo notebooks) in full blown VS, to allow for both interactive evaluation as well as debugging (via attaching to fsi). I would like to achieve a similar workflow using only VS code and dotnet interactive.
Since debugging is not currently supported, my idea is to launch a console app which will serve as the host kernel, with all of our "real" code running inside it, then to attach to that kernel with an interactive notebook.
I have gotten this to work, but it seems very brittle. I had to modify the connect-wpf sample since lots of refactoring has taken place since it was authored, and my console app looks like this:
I can connect to this from a notebook with:
#!connect named-pipe --kernel-name wpf --pipe-name InteractiveWpf
and then access classInstance:
#!wpf
classInstance.Foo()
which prints out 'bar' in the cell's output, and if I attach the debugger to the console app, I can step through that function. So the idea works on paper, but as I said it seems a little brittle and I'm wondering if I'm setting up the host improperly.
For example,. hitting ctrl + space for suggestions on classInstance will bring things to a halt. If I set the debugger on the middleware line
I see two commands come in as a result. The first is an AnonymousKernelCommand, which goes through. Then the second is the RequestCompletions command, which seems to break things. The next() will return, but subsequent commands sent from the notebook are not processed.
If suggestions are not currently supported, is there a way to catch all command errors so that the connection/kernel (not sure which) doesn't die and need to be restarted?
Overall this looks very promising, so thanks for all the great work so far.
Beta Was this translation helpful? Give feedback.
All reactions