You are here

Debugging the PortableApps.com Launcher

22 posts / 0 new
Last post
tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
Debugging the PortableApps.com Launcher

Is the following procedure applicable for debugging the launcher?

  1. Creation of the Directory and File Layout according to the instructions on the website PortableApps.com Format™ 2.0 (2011-11-13)
  2. Creation of a file Dubug.nsh in the folder App\AppInfo\Launcher. In this file I write as example the following line of code: !define DEBUG_ALL
  3. I start the PortableApps.com Launcher Generator and generate the appropriate launcher

If the above described procedure is correct, will then created in every case a file debug.log in the folder Data? Or must I create another line of code in the file Debug.nsh with the following content: !define DEBUG_OUTPUT? Or will the file debug.log only created in the case, if some failure occur during the compilation of the launcher? Or how the file Debug.nsh must be generated exactly?

Aluísio A. S. G.
Offline
Last seen: 8 years 4 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
I won't tell you anything

until you actually try by yourself.

Previously known as kAlug.

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
I've tried it

according to my above described procedure. But I don't get a file debug.log in the folder Data? Can this be because the launcher has no errors?

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 1 week 2 days ago
DeveloperModerator
Joined: 2008-07-24 18:46
Spelling?

Maybe your spelling is incorrect, either in the filename or within the debug header.

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
no experience with debugging

Unfortunately, I'm totally inexperienced with the topic debugging. How can I find the debug header? My file Debug.nsh contains only 1 line of code (!define DEBUG_ALL). Probably is this completely false.

Aluísio A. S. G.
Offline
Last seen: 8 years 4 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
Exec

Have you run the launcher already?

Previously known as kAlug.

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
Yes

I've already run the launcher. This launcher works fine. Afterwards I've created a file Debug.nsh with exactly 1 line of code (!define DEBUG_ALL ) und I pasted this file in the folder App\AppInfo\Launcher. Then I recompiled this launcher with the PortableApps.com Launcher Generator. But after recompiling I found no file debug.log in the folder Data. Is this normal? This was my first attempt with debugging.

By the way can you give me a hint, where I can find an accurate definition regarding such expressions like ${ParseLocations}, ${ReadLauncherConfig} ... and so on. Although I have a rough idea of ​​what these terms might mean, there surely exist also an in-depth explanation of these terms.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 1 week 2 days ago
DeveloperModerator
Joined: 2008-07-24 18:46
Re-run launcher

Did you run the launcher after recompiling it?

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
No

but I've now started the launcher again after recompilation. Once again no file debug.log in the folder Data.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 1 week 2 days ago
DeveloperModerator
Joined: 2008-07-24 18:46
Message Boxes

Are you getting message boxes that pop up when you run the launcher?

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
no

I don't get a messagebox.

But can you give me a hint regarding the definition of the above mentioned expressions? You should not explain me this expressions. Only a hint to a document, where I can read this definitions.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 1 week 2 days ago
DeveloperModerator
Joined: 2008-07-24 18:46
Manual

The information about $(ReadLauncherConfig) is listed in the manual: https://portableapps.com/manuals/PortableApps.comLauncher/advanced/custo...

As for $(ParseLocations), it's internal to PAL, there is no documentation on it.

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
meaning of ${ParseLocations}

Can you explain me shortly the meaning of the expression ${ParseLocations}?

Aluísio A. S. G.
Offline
Last seen: 8 years 4 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
ExpandEnvStrings

Other\Source\Segments\Variables.nsh:105

; Expands environment variables on a variable and provides a debug message
; about it.

Previously known as kAlug.

depp.jones
Offline
Last seen: 2 hours 23 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
If you don't get message

If you don't get message boxes or a debug.log, you are doing something wrong.
According to your answers, I think you did everything needed to generate a debug launcher (setup a working dev test with launcher and app already, create debug.nsh with !define DEBUG_ALL in App\AppInfo\Launcher\, run the launcher generator again in that folder, run the debug launcher after creation).
That leaves another source of error: Did you run the launcher generator in the right folder? Or did you run the right launcher? It is easy to be confused if working in several folders at once (just a guess because I made that error once or twice in the past).

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
run of the launcher generator in the right folder

Let me take as an example my portable app PicPick. After pasting the necessary file Debug.nsh in the folder App\AppInfo\Launcher the launcher generator as before point to the folder PicPickPortable. Is this incorrect? Or must I remove the first created launcher before I recompile the debug launcher? Or can I directly create a debug launcher?

depp.jones
Offline
Last seen: 2 hours 23 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
Correct.Are you shure, the

Correct.
Are you shure, the launcher is properly closed before generating the new one? Otherwise it cannot be created. The launcher generator does not produce an error (btw. is this a bug? Wink ) if there already exists another launcher at the location that is still in use.
You see something was wrong if you cannot launch the launcher directly after creation from the generators message box but have the "view log file" box checked.

But I consider that not the fault cause you would have read the error log of the generator already.

I have no idea what otherwise went wrong.

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
problem solved

I've found now the reason for my problem. In my Folder Layout exist already some content in the folder Data. I have now removed the complete content of the folder Data (i.e. the folder data was empty). Then I start the launcher generator. When I now start the debug launcher, then appears the messageboxes and also the file debug.log is contained in the folder Data. Also I can directly create a debug launcher, i.e. it's not necessary to create a normal launcher first.

Aluísio A. S. G.
Offline
Last seen: 8 years 4 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
Odd

You should be able to create a debug launcher with already-existing Data.
And yes, a debug launcher doesn't depend on creating a non-debug one first.

Previously known as kAlug.

Aluísio A. S. G.
Offline
Last seen: 8 years 4 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
It does

It does error if the launcher is already in use.

Previously known as kAlug.

depp.jones
Offline
Last seen: 2 hours 23 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
I don't get one (see

I don't get one (see screenshot). Only if I open the log file, I can read the error message. I know, "view log file" gets preselected in that case, but the message box tells another story (Launcher created, when it is not). I normally only read log files when an error occurs so I would have deselected the "view log file" option if I had not known that this option normally stays unchecked.
-edit-
screenshooter.net seem to be offline atm. imageshack link instead.

Aluísio A. S. G.
Offline
Last seen: 8 years 4 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
You're right

Yeah, you're right.
I think this is what happens when you live on the bleeding edge.

Previously known as kAlug.

Log in or register to post comments