Debug questions

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Potter
Level 2
Level 2
Posts: 17
Joined: Thu Aug 30, 2018 10:59 am

Debug questions

Post by Potter »

Hi,
I started wine debugging an application. Want to find out what calls and so are made, when I press a certain key in the app.
It is a bit confusing to not mix WINEDEBUG with winedbg. Might be a good idea to make the docs more clearly arount this point.

Correct me, please, where I am wrong in these statements:

WINEDEBUG with its parameters in command line together with wine command starts progs from the command line .... is a mean to see debug output in terminal while the app runs normally in foreground.
It cannot stand alone.
It is a switch.
It is not a program.
It is not an environment variable that can be exported (but channels can be put in registry).
Example 1:

Code: Select all

WINEDEBUG=fixme-all,err-listview,trace+heap wine  "F:\\myprogram.exe"
winedbg is a command line program used instead of wine. Opens the debugger in its interactive mode. Runs the app. Allows entering typical debugging commands.
It has no output presets.
Example 2:

Code: Select all

winedbg  "F:\\myprogram.exe"
In order preset the debugging output (WINEDEBUG) inside a debugging session (winedbg) one has to combine these both like this:
Example 3:

Code: Select all

WINEDEBUG=fixme-all,err-listview,trace+heap winedbg  "F:\\myprog.exe"
Unfortunately, the last point gives no winedbg prompt. It shows up like Example 1, but stops after some lines. Then I tried CTRL+C and it continued showing output and started the app. What do I do wrong here?

Thank You
spoon0042
Level 6
Level 6
Posts: 570
Joined: Thu Dec 24, 2009 11:00 am

Re: Debug questions

Post by spoon0042 »

WINEDEBUG is, in fact, an environment variable and exporting it should work. I don't know what would have given you the impression otherwise.

The wiki page describing it is here: https://wiki.winehq.org/Debug_Channels

There's also a page for winedbg and other links if you want some reading material.

winedbg is a separate debugging application; it's possible there's some issue using it with certain WINEDEBUG settings but I don't have much experience there.
Potter
Level 2
Level 2
Posts: 17
Joined: Thu Aug 30, 2018 10:59 am

Re: Debug questions

Post by Potter »

You are right, I have read the Debug channel doc but obviously not the first line.
The second doc is new for me. I had used Wine Developer's Guide/Debugging wine.
Thank You!
Locked