diff options
-rw-r--r-- | src/app.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -501,6 +501,7 @@ const iString *downloadDir_App(void) { | |||
501 | } | 501 | } |
502 | 502 | ||
503 | const iString *debugInfo_App(void) { | 503 | const iString *debugInfo_App(void) { |
504 | extern char **environ; /* The environment variables. */ | ||
504 | iApp *d = &app_; | 505 | iApp *d = &app_; |
505 | iString *msg = collectNew_String(); | 506 | iString *msg = collectNew_String(); |
506 | format_String(msg, "# Debug information\n"); | 507 | format_String(msg, "# Debug information\n"); |
@@ -512,6 +513,11 @@ const iString *debugInfo_App(void) { | |||
512 | cstr_String(bookmarkTitle_DocumentWidget(doc))); | 513 | cstr_String(bookmarkTitle_DocumentWidget(doc))); |
513 | append_String(msg, collect_String(debugInfo_History(history_DocumentWidget(doc)))); | 514 | append_String(msg, collect_String(debugInfo_History(history_DocumentWidget(doc)))); |
514 | } | 515 | } |
516 | appendCStr_String(msg, "## Environment\n```\n"); | ||
517 | for (char **env = environ; *env; env++) { | ||
518 | appendFormat_String(msg, "%s\n", *env); | ||
519 | } | ||
520 | appendCStr_String(msg, "```\n"); | ||
515 | appendFormat_String(msg, "## Launch arguments\n```\n"); | 521 | appendFormat_String(msg, "## Launch arguments\n```\n"); |
516 | iConstForEach(StringList, i, args_CommandLine(&d->args)) { | 522 | iConstForEach(StringList, i, args_CommandLine(&d->args)) { |
517 | appendFormat_String(msg, "%3zu : %s\n", i.pos, cstr_String(i.value)); | 523 | appendFormat_String(msg, "%3zu : %s\n", i.pos, cstr_String(i.value)); |
@@ -519,7 +525,7 @@ const iString *debugInfo_App(void) { | |||
519 | appendFormat_String(msg, "```\n## Launch commands\n"); | 525 | appendFormat_String(msg, "```\n## Launch commands\n"); |
520 | iConstForEach(StringList, j, d->launchCommands) { | 526 | iConstForEach(StringList, j, d->launchCommands) { |
521 | appendFormat_String(msg, "%s\n", cstr_String(j.value)); | 527 | appendFormat_String(msg, "%s\n", cstr_String(j.value)); |
522 | } | 528 | } |
523 | appendFormat_String(msg, "## MIME hooks\n"); | 529 | appendFormat_String(msg, "## MIME hooks\n"); |
524 | append_String(msg, debugInfo_MimeHooks(d->mimehooks)); | 530 | append_String(msg, debugInfo_MimeHooks(d->mimehooks)); |
525 | return msg; | 531 | return msg; |