Comments (12)
I have committed a fix for this. Baring something unexpected, it should ship in VS 2019 version 16.2 preview 3.
from concordextensibilitysamples.
Have you seen these --
- https://github.com/Microsoft/ConcordExtensibilitySamples/wiki/Cpp-Custom-Visualizer-Sample
- https://github.com/Microsoft/ConcordExtensibilitySamples/wiki/Worker-Process-Remoting
What happens after you add WorkerProcessSupported="true"
? Does everything build successful, but you are seeing problems when running? Or you are running into build problems?
If you are running into problems when running: is your extension loading in the worker process? In case you are not aware: the easiest way to debug this would be to launch devenv.exe under either a native or mixed-mode debugger (ex: Enable 'Unmanaged code debugging' in your launching project's project properties), and use the Microsoft Child Process Debugging Power Tool to automatically debug the msvsmon process for managed-only debugging.
from concordextensibilitysamples.
Thanks for the hints. I will try the Child Process Debugging Power tool. Meanwhile I did some progress :-)
If add WorkerProcessSupported="true" to vsdconfigxml my IDkmCustomVisualizer is loaded to the external process.I was able to find that it is "msvsmon". So I attached VS to this process and indeed my EvaluateVisualizedExpression is called.
However my method is pretty complex and I work here with (PDB) symbols and do additional evaluations. For example I call DkmLanguageExpression.Create and DkmVisualizedExpression.EvaluateExpressionCallback for which I get exception saying that I can't call these methods from external process.
Now it is starting to make sense that I need to communicate with my VS extension process via DkmCustomMessage (from the article). However for me it is crucial to work with active instance of DkmVisualizedExpression (root/children).
How can I transfer it to VS extension process so it will be active? Or how can I call expression evaluations from VS extension process? E.g.
"pGeom!", "pGeom->size()" or "((MyGeomClass*)0x0ffff2342)->size()"
from concordextensibilitysamples.
Both DkmLanguageExpression.Create and EvaluateExpressionCallback should be callable from within a worker process. Are you creating your own DkmInspectionContext? If so, make sure to call the new overload that has a 'SymbolsConnection' argument.
If that isn't it, can you share more details of where you are seeing the exception? Either copy/paste the arguments you are passing, or save a dump file to drop box/one drive/etc and email me (greggm on the microsoft.com email server) a link to it.
from concordextensibilitysamples.
Hi,
I have a similar problem with our IDkmCustomVisualizer extension. It is working fine when Load debug symbols in external process is unchecked but when it is checked I get this warning
Warning: IDkmCustomVisualizer::EvaluateVisualizedExpression() failed. The object will be formatted without the custom visualizer.
Our extension dll and vsdconfig is deployed here C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Packages\Debugger.
I have tried to add Debugger.Lauch() call in every entry point of our dll but none gets called. I also tried using Microsoft Child Process Debugging Power Tool without success.
Here is a sample of my vsdconfig.xml
<Class Name="DebugComponentDLL.DebugComponent" WorkerProcessSupported="true">
<Implements>
<InterfaceGroup>
<Filter>
<VisualizerId RequiredValue="6A9197EE-22BD-433A-BF1B-9D8863D87058"/>
</Filter>
<Interface Name="IDkmCustomVisualizer"/>
</InterfaceGroup>
</Implements>
</Class>
Any help would really help as we like to use the new out of process debugging feature.
from concordextensibilitysamples.
Hi Bruno,
I believe your extension is loaded to VS external process - like my is loaded if I adjust the vsdconfig.xml WorkerProcessSupported="true". The key point is here that you should attach your debugger to msvsmon process which is automatically created by VS when you launch your target application. That process contains your loaded extension as well - at least in my case it works fine. You can try Microsoft Child Process Debugging Power Tool (extension to VS) referred above, which does this automatically.
However we are apparently limited what VS API methods can be called in this process. In my case I can't call DkmLanguageExpression.Create nor DkmSuccessEvaluationResult.Create. They throw exception E_XAPI_METHOD_UNAVAIL_IN_WORKER_PROCESS. This is blocker in my case, because when VS asks to visualize the expression I do sometimes raw expression evaluation or some other kind of expression evaluation (e.g. function calls). Without these methods my visualization is impossible - or I was not able to find an alternative.
Hope this helps :-)
Csaba
from concordextensibilitysamples.
Thanks. I was able to track down the problem. There isn't a good work around right now aside from either disabling out-of-process symbols, or implementing your custom visualizer in C++. We will work on getting this addressed in a future update of Visual Studio 2019.
from concordextensibilitysamples.
Hi Csaba,
My extensions needs to call DkmLanguageExpression.Create and DkmSuccessEvaluationResult.Create. So I have the same problem. Thanks for the heads-up.
Looking forward for a fix in a future update of VS2019.
Bruno
from concordextensibilitysamples.
VS 2019 16.2 preview 3 has now shipped in the Visual Studio Preview Channel. This contains my fix for this issue. If you were running into this problem, please install the preview channel and test out your scenarios.
from concordextensibilitysamples.
Now that 16.2 has officially shipped I tried to use our custom visualizer with worker process but it did not work. The extension work if I disable the load debug symbols in external process but if it is enable I get this warning.
Natvis: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Packages\Debugger\Visualizers\CustomPlugin.natvis(4,4): Warning: IDkmCustomVisualizer::EvaluateVisualizedExpression() failed. The object will be formatted without the custom visualizer. Error code: 0x8ede0023.
Anyway to debug this or is there any sample that I can look at.
Thanks.
from concordextensibilitysamples.
@brunov28 lets close this issue and open a new one. The failure you are running into is E_XAPI_COMPONENT_DLL_NOT_FOUND. So please include how you are installing your extension, and how it is implemented. See links above and in the wiki for information on how to install for worker process support, and a sample c++ custom visualizers implemented in C++.
from concordextensibilitysamples.
Sure created a new issue #48
from concordextensibilitysamples.
Related Issues (20)
- How to change the value of an argument at a breakpoint?
- Breaking changes HOT 1
- How to enable debugging client code in Blazor
- "IEnumerable Visualizer" support for our language HOT 6
- Instructions in code are not correct. HOT 1
- Debugging instructions may need clarification with the latest VS 2022 & Child Process Power Tool since I couldn't get it to work HOT 1
- IEnumerable Visualizer shows properties that are marked with attribute to hide them in the debugger HOT 1
- debugging extensions failed. devenv.exe has triggered a breakpoint.(Frame not in moudle) HOT 2
- How to add a custom VisualizerId? HOT 6
- How can I add a new struct and use different Visualizer to show up it and FILETIME? HOT 2
- Difficulties calling function on Complex struct types such as lua_State
- Adding code showing how to add Child items
- This repo is missing important files
- Recent VsDbg versions missing System.Threading.Tasks.dll assembly HOT 4
- Announcement: New releases of C# vsdbg HOT 7
- Unable to load custom VsDbg extensions in linux/WSL using VS 17.7 Preview HOT 6
- Debugger UI integration
- Unable to use IrisExtension following the wiki HOT 3
- $CALLSTACK and $CALLER in Debugger Trace points HOT 4
- Feature request: Allow other .NET languages to participate in Edit and Continue/Hot Reload HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from concordextensibilitysamples.