0
votes

edit:
I don't have source code, and someone says that one would need to have debug files to step in. So, I don't know it's true or not,so I will still ask this question


In VS, I am trying to Attach To Process to external application to find out, what method (with parameters) is fired on specific button-click.

Per this solution, before I click button, i pause execution and click make "Step In", however, button click is not being caught.

Video: https://files.fm/u/2wf4gjxb (neither checking Enable just my code option helps, not unchecking it. Also, it doesn't have any pdb(screenshot), so i assume it is being considered as external code)

Afaik, the window should be WPF (but someone in comment said, it look slike WinForms). Even WinSpy (or alike) programs are unable to detect buttons when I try to inspect the elements on that window. What should I try?

2
@Crowcoder well, i don't know how to do that ( i am a bit new to the VS debugging), specifically i dont know how to find out button-event handler at all. that is external app i dont have any source-code.T.Todua
The Window does not look a WPF window at all... It’s WinForms.Legacy Code
Yes because WPF is direct2D and does not use handles for every control.Legacy Code
@Schwarzie2478 I've updated my question to answer your question. so, you can delete the comment now safely. If i have to post further information, let me know... thanksT.Todua
If it’s WPF you can use snoop archive.codeplex.com/?p=snoopwpf to check the button for its binded command or click event.Legacy Code

2 Answers

1
votes

You could first try to decompile the code you are trying to debug: This can be done at low level with ILSpy ( open source). But there is an extention for ILSpy in Visual studio. I would suggest you take a look at the following link from Microsoft about how to go about debugging third party assemblies: microsoft documentation

As suggested by @Legacy Code , you could go for the easier to use decompiler: dnSpy. You can attach to a process there to and have the code be decompiled.

If the creator added some attributes to block this, it get's a lot harder fast. Recompiling the decompiled code yourself and using those assemblies and such...

1
votes

You can try my Runtime Flow tool. If it is indeed a .NET application, you will see method calls with parameters on the button click.