문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top