rodneyviana / netext

WinDbg extension for data mining managed heap. It also includes commands to list http request, wcf services, WIF tokens among others
http://blogs.msdn.microsoft.com/rodneyviana
Other
224 stars 35 forks source link

Support DML in !wfrom output #16

Open mconnew opened 4 years ago

mconnew commented 4 years ago

Is your feature request related to a problem? Please describe. When investigating an issue I will have a set of objects of a particular type that I wish to output a table of some of the internal values for. The !wfrom command works great for this, but I would like the ability to add DML to the output so that I can one-click drill in. For example, it's typical to output the object address as the first item on the row. Being able to output a dml snippet so that clicking on it will execute "!wdo $addr()" would be great.

Describe the solution you'd like My ideal solution would be some helper expression methods. For example $dmllink(text, command). So for example I could do something like this (pulling from the help output from !wfrom):

!wfrom -nospace -nofield -type *.HttpContext select $dmllink($rpad($addr(),10),"!wdo " + $addr())," ",$if(!_thread, "  --",$lpad($thread(_thread.DONT_USE_InternalThread),4))," ",$if((_timeoutSet==1),$tickstotimespan(_timeout._ticks), "Not set "), " ", $if(_response._completed || _finishPipelineRequestCalled,"Finished", $tickstotimespan($now()-_utcTimestamp.dateData)), " ", $replace($lpad(_response._statusCode,8),"0n","")," ", $rpad($isnull(_request._httpMethod,"NA"),8), " ", $isnull(_request._url.m_String, _request._filePath._virtualPath)

I don't know if color output works in windbg, but I know that dml supports it so being able to set the color of things would also be useful. If helper methods is too difficult due to ambiguity of syntax or too many options (such as right click commands on dml needing overloads) then just supporting being able to provide the raw dml command as part of the output string would be great.

Describe alternatives you've considered I tried emitting the dml in the output already, it didn't work.

rodneyviana commented 4 years ago

That is a good request. I thought about it several but never implemented to avoid too many links being displayed which kills the debugger. Next time I work on NetExt I will consider it. I will keep this thread open until I implement it or verify it will bring more problems than solution.