Skip to content

Disable the debug popup on win32/msvc. #4475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion jerry-main/main-unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if defined (_WIN32)
#include <crtdbg.h>
#include <Windows.h>
#endif

#include "jerryscript.h"
#include "jerryscript-ext/debugger.h"
Expand Down Expand Up @@ -60,7 +64,22 @@ main (int argc,

main_args_t arguments;
arguments.sources_p = sources_p;

#if defined (_WIN32)
if (!IsDebuggerPresent ())
{
/* Disable all of the possible ways Windows conspires to make automated
testing impossible. */
#if defined (_MSC_VER)
_set_error_mode (_OUT_TO_STDERR);
_CrtSetReportMode (_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
_CrtSetReportFile (_CRT_WARN, _CRTDBG_FILE_STDERR);
_CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
_CrtSetReportFile (_CRT_ERROR, _CRTDBG_FILE_STDERR);
_CrtSetReportMode (_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
_CrtSetReportFile (_CRT_ASSERT, _CRTDBG_FILE_STDERR);
#endif
}
#endif
main_parse_args (argc, argv, &arguments);

#if defined (JERRY_EXTERNAL_CONTEXT) && (JERRY_EXTERNAL_CONTEXT == 1)
Expand Down