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

IDebugExpressionContext2.ParseText where does pszCode come from?

$
0
0

Hey,

Im currently trying to make my own debug engine.

My debug engine is made to be used with my own language service for a language which was not supported by VS.

I based my project on this debug engine sample which is pretty good btw (https://code.msdn.microsoft.com/windowsdesktop/Visual-Studio-Debug-Engine-c2e21c0e).

This sample is a debug engine for C++ and the implementation of IDebugExpressionContext2 seems weird to me...

I tried to implement it in my own engine and I realized that the pszCode parameter received differents data...

Lets say we are debugging the following c++ code :

int a = phoneNumberList["Dad"].Number;

and during a debug session I move the mouse cursor to "Number", then the pszCode parameter in the sample engine will be "phoneNumberList["Dad"].Number" which gives you the possibility to search for the symbol "phoneNumberList", then check his children, then finally get to "Number".

However in my debug engine, if I do the same thing with my own language (which is similar to C++), the pszCode would be just "Number", which is a big deal because I cannot get the exact symbol without more informations.

Then I realized that the received pszCode comes from the underlying language service. It is the very token at the mouse position.

In my language service, "phoneNumberList" is a token (an identifier), ""Dad"" is a token (a string), "." is a delimiter, and "Number" is an identifier. Thus, I only receive "Number".

But that makes absolutely no sense... I cant check the code of the c++ language service but... since in c++ "Dad" is red, and "Number" is black, they are obviously not the same token.... so how comes in the sample engine, the ParseText function get the whole text?

Am I missing something there?

Please let me know if the issue is not clear, thanks for any help.






Viewing all articles
Browse latest Browse all 4410

Trending Articles



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