1

Topic: VS2017 - breakpoint on a method only certain object

Whether there is a possibility to deliver breakpoint only when the method (in which is breakpoint) is executed for certain object, instead of all remaining objects of the same type?... <<RSDN@Home 1.0.0 alpha 5 rev. 0>>

2

Re: VS2017 - breakpoint on a method only certain object

Hello, CoderMonkey, you wrote: whether CM> There is a possibility to deliver breakpoint only when the method (in which is breakpoint) is executed for certain object, instead of all remaining objects of the same type? It is possible - conditional breakpoint. And than this object differs from others? Only this?

3

Re: VS2017 - breakpoint on a method only certain object

Hello, VladFein, you wrote: VF> And than this object differs from others? Only this? Aha.... <<RSDN@Home 1.0.0 alpha 5 rev. 0>>

4

Re: VS2017 - breakpoint on a method only certain object

Hello, CoderMonkey, you wrote: CM> Hello, VladFein, you wrote: VF>> And than this object differs from others? Only this? CM> Aha. http://files.rsdn.org/21374/conditional.png

5

Re: VS2017 - breakpoint on a method only certain object

Hello, VladFein, you wrote: VF> http://files.rsdn.org/21374/conditional.png Slightly through that place, but too a variant.... <<RSDN@Home 1.0.0 alpha 5 rev. 0>>

6

Re: VS2017 - breakpoint on a method only certain object

Hello, VladFein, you wrote: VF> http://files.rsdn.org/21374/conditional.png Only there is one problem - garbage collection changes value this. Sharov, and you wanted to tell something comprehended or simply to state the ""?... <<RSDN@Home 1.0.0 alpha 5 rev. 0>>

7

Re: VS2017 - breakpoint on a method only certain object

Hello, CoderMonkey, you wrote: VF>> http://files.rsdn.org/21374/conditional.png CM> Only there is one problem - garbage collection changes value this. The example on a C ++ was, there such is not present In C# it is necessary differently: - In Locals or Watch window for the necessary object we create unique ID (Make Object ID in the shortcut menu). Number will be shown in brackets in Locals\Watch - In Conditional we write this == $n it is possible and not this, and any name of the variable concerning this object.

8

Re: VS2017 - breakpoint on a method only certain object

Hello, Conr, you wrote: a C> - In Locals or Watch window for the necessary object we create unique ID (Make Object ID in the shortcut menu). It is interesting, whether it is possible to make it program?... <<RSDN@Home 1.0.0 alpha 5 rev. 0>>

9

Re: VS2017 - breakpoint on a method only certain object

Hello, CoderMonkey, you wrote: a C>> - In Locals or Watch window for the necessary object we create unique ID (Make Object ID in the shortcut menu). CM> it is interesting, whether it is possible to make it program? It is possible, in VS extension. The most simple method to use built in Expression Evaluator: 1. We receive Debugger5 Interface How to receive - in Remarks 2. We cause Debugger5.GetExpression for this (or any variable) and result  to Expression2 Interface 3. We cause Expression2.MakeObjectId 4.  Expression. Value, to it it will be added {N#} further at desire it is possible in Debugger5.GetExpression to transfer $N and to watch of object. But it is a method oak enough and slow. Though for individual objects perfectly approaches. More effective methods: 1. To join debug session, to receive IDebuggerInternalXX (depending on studio) and to cause IDebuggerInternalXX.CreateObjectID. Not documented  in the pure state, approaches for VS 2010-2017.6.6 At an output of new studio it is necessary to check serviceability and, probably, to search for new interfaces IDebuggerInternalXX. But it is rather simple. 2. To use Concord Debug Engine. , will work on all versions (> =2012). Practically there is no documentation, only it https://github.com/Microsoft/ConcordExt … tySamples. It is implemented noticeably more difficult.