简体   繁体   中英

Ironpython: How to see when a WPF application fails?

I am doing an application with GUI using WPF / XAML with Ironpython and SharpDevelop , until now it works fine, when I'm in the development environment I can see the errors in console and know what is wrong.

But when I build and deploy the app for us on other system or I ran it outside of the development environment and there is no longer the console when there is some error or crashes, it fails silently, and I cannot know what went wrong.

How can I alert or log to see what fails?

You could put in some code to catch the error and log it to a file.

Something possibly simpler is to compile your application as a Console Application. This can be done via Project Options - Application - Output type. Then you will get a console window when you run your WPF application and any exception that happens at startup will be logged to this window.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM