{"id":17402826,"url":"https://github.com/thlorenz/pretty-trace","last_synced_at":"2025-04-30T05:08:01.262Z","repository":{"id":23716806,"uuid":"27089524","full_name":"thlorenz/pretty-trace","owner":"thlorenz","description":"Prettifies traces emitted by tools like lldb.","archived":false,"fork":false,"pushed_at":"2014-12-01T16:27:43.000Z","size":648,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T05:07:53.779Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thlorenz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-24T18:46:07.000Z","updated_at":"2019-04-06T05:23:32.000Z","dependencies_parsed_at":"2022-08-18T21:42:48.606Z","dependency_job_id":null,"html_url":"https://github.com/thlorenz/pretty-trace","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Fpretty-trace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Fpretty-trace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Fpretty-trace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Fpretty-trace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thlorenz","download_url":"https://codeload.github.com/thlorenz/pretty-trace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251644842,"owners_count":21620634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-16T18:29:11.113Z","updated_at":"2025-04-30T05:08:01.223Z","avatar_url":"https://github.com/thlorenz.png","language":"JavaScript","readme":"# pretty-trace [![build status](https://secure.travis-ci.org/thlorenz/pretty-trace.png)](http://travis-ci.org/thlorenz/pretty-trace)\n\n[![testling badge](https://ci.testling.com/thlorenz/pretty-trace.png)](https://ci.testling.com/thlorenz/pretty-trace)\n\nPrettifies traces emitted by tools like lldb.\n\n```js\nvar prettyTrace = require('pretty-trace');\n\nvar lines = fs.readFileSync(__dirname + '/test/fixtures/lldb-trace.txt', 'utf8').split('\\n');\n\nvar prettyLines = prettyTrace.lines(lines, prettyTrace.terminalTheme);\nconsole.log(prettyLines.join('\\n'))\n```\n\n![lldb-trace](https://raw.githubusercontent.com/thlorenz/pretty-trace/master/assets/lldb-trace.png)\n\n## CLI\n\n```\ncat ./test/fixtures/lldb-trace.txt | pretty-trace\n```\n\n## Installation\n\n    npm install pretty-trace\n\n*Used by [resolve-jit-symbols](http://thlorenz.github.io/resolve-jit-symbols/web/)*.\n\n\u003c!-- START docme generated API please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN docme TO UPDATE --\u003e\n\n\u003cdiv\u003e\n\u003cdiv class=\"jsdoc-githubify\"\u003e\n\u003csection\u003e\n\u003carticle\u003e\n\u003cdiv class=\"container-overview\"\u003e\n\u003cdl class=\"details\"\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cdl\u003e\n\u003cdt\u003e\n\u003ch4 class=\"name\" id=\"prettyTrace::htmlTheme\"\u003e\u003cspan class=\"type-signature\"\u003e\u003c/span\u003eprettyTrace::htmlTheme\u003cspan class=\"type-signature\"\u003e\u003c/span\u003e\u003c/h4\u003e\n\u003c/dt\u003e\n\u003cdd\u003e\n\u003cdiv class=\"description\"\u003e\n\u003cp\u003eA theme that surrounds the given trace using with spans classed \u003ccode\u003etrace-*\u003c/code\u003e in order to allow styling with CSS.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdl class=\"details\"\u003e\n\u003cdt class=\"tag-source\"\u003eSource:\u003c/dt\u003e\n\u003cdd class=\"tag-source\"\u003e\u003cul class=\"dummy\"\u003e\n\u003cli\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js\"\u003epretty-trace.js\u003c/a\u003e\n\u003cspan\u003e, \u003c/span\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js#L202\"\u003elineno 202\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\n\u003ch4 class=\"name\" id=\"prettyTrace::regexes::instruments\"\u003e\u003cspan class=\"type-signature\"\u003e\u003c/span\u003eprettyTrace::regexes::instruments\u003cspan class=\"type-signature\"\u003e\u003c/span\u003e\u003c/h4\u003e\n\u003c/dt\u003e\n\u003cdd\u003e\n\u003cdiv class=\"description\"\u003e\n\u003cp\u003eRegexes used to match callgraphs generated with Mac Instruments.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdl class=\"details\"\u003e\n\u003cdt class=\"tag-source\"\u003eSource:\u003c/dt\u003e\n\u003cdd class=\"tag-source\"\u003e\u003cul class=\"dummy\"\u003e\n\u003cli\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js\"\u003epretty-trace.js\u003c/a\u003e\n\u003cspan\u003e, \u003c/span\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js#L44\"\u003elineno 44\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\n\u003ch4 class=\"name\" id=\"prettyTrace::regexes::lldb\"\u003e\u003cspan class=\"type-signature\"\u003e\u003c/span\u003eprettyTrace::regexes::lldb\u003cspan class=\"type-signature\"\u003e\u003c/span\u003e\u003c/h4\u003e\n\u003c/dt\u003e\n\u003cdd\u003e\n\u003cdiv class=\"description\"\u003e\n\u003cp\u003eRegexes used to match debug traces created by tools like lldb.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdl class=\"details\"\u003e\n\u003cdt class=\"tag-source\"\u003eSource:\u003c/dt\u003e\n\u003cdd class=\"tag-source\"\u003e\u003cul class=\"dummy\"\u003e\n\u003cli\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js\"\u003epretty-trace.js\u003c/a\u003e\n\u003cspan\u003e, \u003c/span\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js#L4\"\u003elineno 4\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\n\u003ch4 class=\"name\" id=\"prettyTrace::regexes::perf\"\u003e\u003cspan class=\"type-signature\"\u003e\u003c/span\u003eprettyTrace::regexes::perf\u003cspan class=\"type-signature\"\u003e\u003c/span\u003e\u003c/h4\u003e\n\u003c/dt\u003e\n\u003cdd\u003e\n\u003cdiv class=\"description\"\u003e\n\u003cp\u003eRegexes used to match callgraphs generated running Linux perf, i.e. \u003ccode\u003eperf script\u003c/code\u003e.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdl class=\"details\"\u003e\n\u003cdt class=\"tag-source\"\u003eSource:\u003c/dt\u003e\n\u003cdd class=\"tag-source\"\u003e\u003cul class=\"dummy\"\u003e\n\u003cli\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js\"\u003epretty-trace.js\u003c/a\u003e\n\u003cspan\u003e, \u003c/span\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js#L60\"\u003elineno 60\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\n\u003ch4 class=\"name\" id=\"prettyTrace::terminalTheme\"\u003e\u003cspan class=\"type-signature\"\u003e\u003c/span\u003eprettyTrace::terminalTheme\u003cspan class=\"type-signature\"\u003e\u003c/span\u003e\u003c/h4\u003e\n\u003c/dt\u003e\n\u003cdd\u003e\n\u003cdiv class=\"description\"\u003e\n\u003cp\u003eA theme that colorizes the given trace using ANSI color codes.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdl class=\"details\"\u003e\n\u003cdt class=\"tag-source\"\u003eSource:\u003c/dt\u003e\n\u003cdd class=\"tag-source\"\u003e\u003cul class=\"dummy\"\u003e\n\u003cli\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js\"\u003epretty-trace.js\u003c/a\u003e\n\u003cspan\u003e, \u003c/span\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js#L179\"\u003elineno 179\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003cdl\u003e\n\u003cdt\u003e\n\u003ch4 class=\"name\" id=\"prettyTrace::line\"\u003e\u003cspan class=\"type-signature\"\u003e\u003c/span\u003eprettyTrace::line\u003cspan class=\"signature\"\u003e(line, theme)\u003c/span\u003e\u003cspan class=\"type-signature\"\u003e \u0026rarr; {string}\u003c/span\u003e\u003c/h4\u003e\n\u003c/dt\u003e\n\u003cdd\u003e\n\u003cdiv class=\"description\"\u003e\n\u003cp\u003ePrettifies the given line.\u003c/p\u003e\n\u003c/div\u003e\n\u003ch5\u003eParameters:\u003c/h5\u003e\n\u003ctable class=\"params\"\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eName\u003c/th\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth class=\"last\"\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003eline\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003estring\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\u003cp\u003ethe line to be prettified\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003etheme\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003eObject\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\u003cp\u003etheme that specifies how to prettify a trace\u003c/p\u003e\n\u003ch6\u003eProperties\u003c/h6\u003e\n\u003ctable class=\"params\"\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eName\u003c/th\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth class=\"last\"\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003eraw\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003efunction\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\u003cp\u003einvoked to surround an unparsable line\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003eframe\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003efunction\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\u003cp\u003einvoked to surround the frame number\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003eaddress\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003efunction\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\u003cp\u003einvoked to surround the hex address\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003esymbol\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003efunction\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\u003cp\u003einvoked to surround the symbol corresponding to the address, i.e. a function name\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003elocation\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003efunction\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\u003cp\u003einvoked to surround the location in the file at which the symbol is found\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cdl class=\"details\"\u003e\n\u003cdt class=\"tag-source\"\u003eSource:\u003c/dt\u003e\n\u003cdd class=\"tag-source\"\u003e\u003cul class=\"dummy\"\u003e\n\u003cli\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js\"\u003epretty-trace.js\u003c/a\u003e\n\u003cspan\u003e, \u003c/span\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js#L76\"\u003elineno 76\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\u003ch5\u003eReturns:\u003c/h5\u003e\n\u003cdiv class=\"param-desc\"\u003e\n\u003cp\u003eprettified line\u003c/p\u003e\n\u003c/div\u003e\n\u003cdl\u003e\n\u003cdt\u003e\nType\n\u003c/dt\u003e\n\u003cdd\u003e\n\u003cspan class=\"param-type\"\u003estring\u003c/span\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\n\u003ch4 class=\"name\" id=\"prettyTrace::lines\"\u003e\u003cspan class=\"type-signature\"\u003e\u003c/span\u003eprettyTrace::lines\u003cspan class=\"signature\"\u003e(lines, theme)\u003c/span\u003e\u003cspan class=\"type-signature\"\u003e \u0026rarr; {Array.\u0026lt;string\u003e}\u003c/span\u003e\u003c/h4\u003e\n\u003c/dt\u003e\n\u003cdd\u003e\n\u003cdiv class=\"description\"\u003e\n\u003cp\u003ePrettifies multiple lines.\u003c/p\u003e\n\u003c/div\u003e\n\u003ch5\u003eParameters:\u003c/h5\u003e\n\u003ctable class=\"params\"\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eName\u003c/th\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth class=\"last\"\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003elines\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003eArray.\u0026lt;string\u003e\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\u003cp\u003elines to be prettified\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003etheme\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003eObject\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\u003cp\u003etheme that specifies how to prettify a trace @see prettyTrace::line\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cdl class=\"details\"\u003e\n\u003cdt class=\"tag-source\"\u003eSource:\u003c/dt\u003e\n\u003cdd class=\"tag-source\"\u003e\u003cul class=\"dummy\"\u003e\n\u003cli\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js\"\u003epretty-trace.js\u003c/a\u003e\n\u003cspan\u003e, \u003c/span\u003e\n\u003ca href=\"https://github.com/thlorenz/pretty-trace/blob/master/pretty-trace.js#L158\"\u003elineno 158\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\u003ch5\u003eReturns:\u003c/h5\u003e\n\u003cdiv class=\"param-desc\"\u003e\n\u003cp\u003ethe prettified lines\u003c/p\u003e\n\u003c/div\u003e\n\u003cdl\u003e\n\u003cdt\u003e\nType\n\u003c/dt\u003e\n\u003cdd\u003e\n\u003cspan class=\"param-type\"\u003eArray.\u0026lt;string\u003e\u003c/span\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/article\u003e\n\u003c/section\u003e\n\u003c/div\u003e\n\n*generated with [docme](https://github.com/thlorenz/docme)*\n\u003c/div\u003e\n\u003c!-- END docme generated API please keep comment here to allow auto update --\u003e\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthlorenz%2Fpretty-trace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthlorenz%2Fpretty-trace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthlorenz%2Fpretty-trace/lists"}