How to log js stack trace with console.trace() but keep it collapsed

The answer was to use console.groupCollapsed(); console.groupCollapsed(‘name to show to identify trace’); console.log(‘additional data hidden inside collapsed group’); console.trace(); // hidden in collapsed group console.groupEnd(); Which looks something like this in console. ( works in chrome, not sure of others )

How to get non-current thread’s stacktrace?

NB: Skip to the bottom of this answer for an update. Here’s what’s worked for me so far: StackTrace GetStackTrace (Thread targetThread) { StackTrace stackTrace = null; var ready = new ManualResetEventSlim(); new Thread (() => { // Backstop to release thread in case of deadlock: ready.Set(); Thread.Sleep (200); try { targetThread.Resume(); } catch { … Read more

Cleaning noise out of Java stack traces

intellij-idea allows customizable stack trace folding, especially useful with dynamic languages. (source: jetbrains.com) and an Analyzing external stack traces tool. I can imagine general tool/filter working on logging framework (like logback or log4j) level. I don’t think there is any general support for that, but I think it is a great idea to implement this. … Read more

How to print stack trace with reference to typescript source in Nest.js

For visibility purposes: adding the source-map-support NPM package allows for tracing typescript files in the stack trace. It can be added on the command line with node -r source-map-support/register fileToRun.js or programatically with import * as sourceMapSupport from ‘source-map-support’; sourceMapSupport.install(); OR import { install } from ‘source-map-support’; install(); OR with ES6 modules import ‘source-map-support/register’;

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)