Is there an easy way to monitor a given Windows process for a well defined .NET exception (either first or second chance) and run a powershell script when that exception is raised? I don't really need a process dump (yet).
How to post-mortem debug .NET process and run powershell script as debugger action?
139 views Asked by user2368632 At
1
There are 1 answers
Related Questions in POWERSHELL
- PowerShell Linphone Configuration
- How avoid \t being converted to Tab in Powershell
- How do I get my terminal to work in VS Code? Exit Code:2, doesn't allow me to type anything
- Npm command not working in powershell but works in cmd
- Issue with path not being treated as encapsulated when calling cmd /C
- Native command throws error only when I redirect to a variable
- Logic Apps and long running Azure Function (Powershell)
- April fools - PsExec (PsTools)
- How to use nested ForEach-Object
- Batch Script-Powershell MessageBox | How do I set TopMost within PS command line of Batch?
- Execution Stuck at Get-PnPPage if function executed on Button Click
- How can I expand a column from group output?
- How to use expression in regex -replace with capturing group in powershell
- powershell where-object -cnotmatch filter unwanted lines
- How to make Visual Studio 2022 project launch Windows Terminal instead of PowerShell?
Related Questions in POSTMORTEM-DEBUGGING
- How to interpret different pieces of output in a Linux kernel stack trace?
- Debugging a coredump generated by an ASLR enabled system
- Analyze Linux core dump on different machine: threads and shared libs
- Can I force Windows create a Local Dump of a crashing .NET application?
- java -XX:OnError for post mortem?
- Windbg TTD automation
- How can I know the type of a Windows dump file?
- How can I solve the error "Can't switch processors on a single processor kernel triage dump" in WinDbg?
- How to post-mortem debug .NET process and run powershell script as debugger action?
- Analyze container file system on kubernetes after it exits/crashes
- Is there a way to get pg_stat_activity information without using an SQL connection?
- If i forgot to fill field than not show laravel error
- Search through memory in VS2017
- Automatic Crash Dump for .Net process
- How to do post-mortem debugging within Django's runserver?
Related Questions in DEBUGDIAG
- DebugDiagnosticTool Rule for process which restart eriodically
- Capture memory dump with stack for a given exception type seen to occur at a given frequency
- How to get DebugDiag to show method names in the stack trace?
- How to use DebugDiag now that Internet Explorer is deprecated?
- memory issues on a native c++ app on windows
- IIS Application Pool Crashing - Safe handle has been closed - IAsync
- Is there a way to have DebugDiag2 output a report formatted as text only?
- DebugDiag dump doesn't include a .NET exception, depending on certain code
- What is LogHelp_TerminateOnAssert?
- Memory leak when using UI Automation in Windows 10
- How to know the OperationContract was called by request using debug diagnostic tool
- debugging hang with DebugDiag - GC hang?
- debugging hang with DebugDiag - mystery exceptions
- DebugDiag Analysis hangs while "Dumping Thread Data"
- How to post-mortem debug .NET process and run powershell script as debugger action?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
.NET application errors are logged to the Application Events Log. In the Scheduled Task manager, we can add a task which is triggered by a .NET Runtime exception event.
In practice, this is a bit troublesome to do by hand, since we need some additional
ValueQueriesto make this work, I've made a task XML which can be imported into the Task Scheduler. See this gist.The task needs to call our PowerShell script with an
EventId, from which we retrieve the corresponding event log item, check the message for the stacktrace, and search for the matching known exception string.Once the task is enabled, every time your .NET application faults, the PowerShell script should be run.