direktor05 2 Posted September 10 Hello, I have a list that is running procedures and functions all the time, based on timers. Like Load List, Do Something, Check Something, Do Next Thing.... How would I check when certain event happens on one line in the list. If I go through debugging it would be a night mare to go through 100s of procedures just to see whats happening in 1 line of list. I'd need some kind of event listener or something that would be triggered only when certain conditions are met or certain action happens on the list. To log events that happen after that. How would I make such an event listener. However this is not event listener based on component - like click or something. But when certain data would come into the list or when certain time would come when process would jump to specific line in the list. Share this post Link to post
darnocian 87 Posted September 10 Do you mean like getting stack trace information and looking at the procedure name? There is a feature in the Jedi project that works on Windows that allows you to identify the procedure... https://blog.dummzeuch.de/2014/03/08/using-jcldebug/ describes it conceptually Share this post Link to post
direktor05 2 Posted September 10 Something like this. But this is debugger. Exceptions catcher. I mean like this. Lets say you have a music player. Rihanna - Only Girl.mp3 MichelJackson - Baby Jane.mp3 Prince - 1999.mp3 I start playing the list. I set up alarm, I say after 3 minutes no matter what you play start playing track 2 - Micheal Jackson. I want to know which procedures, functions are triggered/called when this happens. I need to know which procedures/functions program calls when it starts playing track 2 on timer. Share this post Link to post
direktor05 2 Posted September 10 So I need to have some kind of event catcher. That would be triggered only when something happens. Not all the time, otherwise I'd have a tracking list looking like this Rihanna - Only Girl.mp3 Rihanna - Only Girl.mp3 Rihanna - Only Girl.mp3 Share this post Link to post
Uwe Raabe 2060 Posted September 10 You can set a breakpoint in all possible methods and enter the Condition triggering it. In the Advanced view you can disable Break and set a Log message. This won't interrupt your debugging session and you can see the messages in the event log Share this post Link to post
direktor05 2 Posted September 10 There is an option with DebugView (https://learn.microsoft.com/en-us/sysinternals/downloads/debugview) by adding debuglog.add('ProcedurenName'); to every function/procedure and checking what is executed. However this debugview log becomes saturated with junk because the program repeatedly calls certain procedures and functions all the time when the track mp3 is playing. This info I don't need. I just need the info which procedure is called exactly when timer is triggered to play track 2. Not before not after. Share this post Link to post
direktor05 2 Posted September 10 (edited) 4 minutes ago, Uwe Raabe said: You can set a breakpoint in all possible methods and enter the Condition triggering it. In the Advanced view you can disable Break and set a Log message. This won't interrupt your debugging session and you can see the messages in the event log Uwe you are always full of good ideas. Yes this possible methods are many. A few 10. The condition I don't know exactly, if I'd know the triggering condition I'd know where to find the right procedure. That is the catch. I need to know what is triggering the procedures that are executed on timer Track 2 and which methods are triggered. Edited September 10 by direktor05 Share this post Link to post
Uwe Raabe 2060 Posted September 10 Just now, direktor05 said: I just need the info which procedure is called exactly when timer is triggered to play track 2. Not before not after. Extending my suggestion above, you can achieve this by creating a Group for all these breakpoints. Then add another breakpoint in the timer event, disable Break and select that group in Enable group. Add a similar breakpoint setting Disable group when you want to stop the log messages. Share this post Link to post
direktor05 2 Posted September 10 Just now, Uwe Raabe said: Extending my suggestion above, you can achieve this by creating a Group for all these breakpoints. Then add another breakpoint in the timer event, disable Break and select that group in Enable group. Add a similar breakpoint setting Disable group when you want to stop the log messages. ok I'll try Share this post Link to post
darnocian 87 Posted September 10 your reference to 'debugview' makes it look like you are also after a logging framework. On getit, there are some options. Using a debugger is great for fault finding, but logging will help with a running app. Using a logging framework, you can decide when you want to enable/disable logging. If you have a console app, the poor man version is 'writeln' 😉 Share this post Link to post