File tree 1 file changed +20
-1
lines changed
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 17
17
#include <stdio.h>
18
18
#include <stdlib.h>
19
19
#include <string.h>
20
+ #if defined (_WIN32 )
21
+ #include <crtdbg.h>
22
+ #include <Windows.h>
23
+ #endif
20
24
21
25
#include "jerryscript.h"
22
26
#include "jerryscript-ext/debugger.h"
@@ -60,7 +64,22 @@ main (int argc,
60
64
61
65
main_args_t arguments ;
62
66
arguments .sources_p = sources_p ;
63
-
67
+ #if defined (_WIN32 )
68
+ if (!IsDebuggerPresent ())
69
+ {
70
+ /* Disable all of the possible ways Windows conspires to make automated
71
+ testing impossible. */
72
+ #if defined (_MSC_VER )
73
+ _set_error_mode (_OUT_TO_STDERR );
74
+ _CrtSetReportMode (_CRT_WARN , _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG );
75
+ _CrtSetReportFile (_CRT_WARN , _CRTDBG_FILE_STDERR );
76
+ _CrtSetReportMode (_CRT_ERROR , _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG );
77
+ _CrtSetReportFile (_CRT_ERROR , _CRTDBG_FILE_STDERR );
78
+ _CrtSetReportMode (_CRT_ASSERT , _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG );
79
+ _CrtSetReportFile (_CRT_ASSERT , _CRTDBG_FILE_STDERR );
80
+ #endif
81
+ }
82
+ #endif
64
83
main_parse_args (argc , argv , & arguments );
65
84
66
85
#if defined (JERRY_EXTERNAL_CONTEXT ) && (JERRY_EXTERNAL_CONTEXT == 1 )
You can’t perform that action at this time.
0 commit comments