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"
@@ -62,7 +66,22 @@ main (int argc,
62
66
63
67
main_args_t arguments ;
64
68
arguments .sources_p = sources_p ;
65
-
69
+ #if defined (_WIN32 )
70
+ if (!IsDebuggerPresent ())
71
+ {
72
+ /* Disable all of the possible ways Windows conspires to make automated
73
+ testing impossible. */
74
+ #if defined (_MSC_VER )
75
+ _set_error_mode (_OUT_TO_STDERR );
76
+ _CrtSetReportMode (_CRT_WARN , _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG );
77
+ _CrtSetReportFile (_CRT_WARN , _CRTDBG_FILE_STDERR );
78
+ _CrtSetReportMode (_CRT_ERROR , _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG );
79
+ _CrtSetReportFile (_CRT_ERROR , _CRTDBG_FILE_STDERR );
80
+ _CrtSetReportMode (_CRT_ASSERT , _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG );
81
+ _CrtSetReportFile (_CRT_ASSERT , _CRTDBG_FILE_STDERR );
82
+ #endif
83
+ }
84
+ #endif
66
85
main_parse_args (argc , argv , & arguments );
67
86
68
87
#if defined (JERRY_EXTERNAL_CONTEXT ) && (JERRY_EXTERNAL_CONTEXT == 1 )
You can’t perform that action at this time.
0 commit comments