Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Cannot add breakpoint in WpfTextViewHost

$
0
0

I want to have 2 editor views for a C# file. One is for full view, and one is for partial view (zoom into a function)

I created WpfTextViewHost by following these steps:

1) RegisterInvisibileEditor: using RegisterInvisibleEditor(filepath)

2) from invisibleEditor get DocData: using invisibleEditor.GetDocData

3) convert DocData to IVsTextLines object: using (IVsTextLines)Marshal.GetObjectForIUnknown(docDataPointer)

4) The IVsTextLines object has correct language service id (C#)

5) create codeWidow from docData: using CreateVsCodeWindowAdapter, SetBuffer

6) get textView from codeWindow: codeWindow.GetPrimaryView(out textView)

7) get textWpfViewHost: _editorAdapter.GetWpfTextViewHost(textView)

Then I have my own custom editor working with intellisense, completion, highlight... but I cannot add breakpoint to the code in my custom editor. However if I add breakpoint in the normal editor, the breakpoint will appear in my custom editor.

My question is: what else do I need to set it up to be able to reuse the C# language service and allow user to add breakpoint in my custom editor.

Thanks.


wang


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>