Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Side by Side Diff: runtime/bin/main.cc

Issue 1649843002: Add --warn-on-pause-with-no-debugger flag. Add this to --observe behavior. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code review, etc. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/debugger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <string.h> 6 #include <string.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_tools_api.h" 10 #include "include/dart_tools_api.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 &vm_service_server_port, 418 &vm_service_server_port,
419 &vm_service_server_ip, 419 &vm_service_server_ip,
420 DEFAULT_VM_SERVICE_SERVER_PORT, 420 DEFAULT_VM_SERVICE_SERVER_PORT,
421 DEFAULT_VM_SERVICE_SERVER_IP)) { 421 DEFAULT_VM_SERVICE_SERVER_IP)) {
422 Log::PrintErr("unrecognized --observe option syntax. " 422 Log::PrintErr("unrecognized --observe option syntax. "
423 "Use --observe[:<port number>[/<IPv4 address>]]\n"); 423 "Use --observe[:<port number>[/<IPv4 address>]]\n");
424 return false; 424 return false;
425 } 425 }
426 426
427 vm_options->AddArgument("--pause-isolates-on-exit"); 427 vm_options->AddArgument("--pause-isolates-on-exit");
428 vm_options->AddArgument("--pause-isolates-on-unhandled-exceptions");
429 vm_options->AddArgument("--warn-on-pause-with-no-debugger");
428 return true; 430 return true;
429 } 431 }
430 432
431 433
432 static bool ProcessTraceLoadingOption(const char* arg, 434 static bool ProcessTraceLoadingOption(const char* arg,
433 CommandLineOptions* vm_options) { 435 CommandLineOptions* vm_options) {
434 if (*arg != '\0') { 436 if (*arg != '\0') {
435 return false; 437 return false;
436 } 438 }
437 has_trace_loading = true; 439 has_trace_loading = true;
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 "--checked or -c\n" 855 "--checked or -c\n"
854 " Insert runtime type checks and enable assertions (checked mode).\n" 856 " Insert runtime type checks and enable assertions (checked mode).\n"
855 "--help or -h\n" 857 "--help or -h\n"
856 " Display this message (add -v or --verbose for information about\n" 858 " Display this message (add -v or --verbose for information about\n"
857 " all VM options).\n" 859 " all VM options).\n"
858 "--package-root=<path> or -p<path>\n" 860 "--package-root=<path> or -p<path>\n"
859 " Where to find packages, that is, \"package:...\" imports.\n" 861 " Where to find packages, that is, \"package:...\" imports.\n"
860 "--packages=<path>\n" 862 "--packages=<path>\n"
861 " Where to find a package spec file.\n" 863 " Where to find a package spec file.\n"
862 "--observe[=<port>[/<bind-address>]]\n" 864 "--observe[=<port>[/<bind-address>]]\n"
863 " Enable the VM service and cause isolates to pause on exit (default port is\n" 865 " The observe flag is used to run a program with a default set of options\n"
864 " 8181, default bind address is 127.0.0.1). With the default options,\n" 866 " for debugging under Observatory. With the default options, Observatory\n"
865 " Observatory will be available locally at http://127.0.0.1:8181/\n" 867 " will be available at http://127.0.0.1:8181/ (default port is 8181,\n"
868 " default bind address is 127.0.0.1). Isolates will pause at exit and\n"
869 " when they throw unhandled exceptions.\n"
866 "--version\n" 870 "--version\n"
867 " Print the VM version.\n"); 871 " Print the VM version.\n");
868 } else { 872 } else {
869 Log::PrintErr( 873 Log::PrintErr(
870 "Supported options:\n" 874 "Supported options:\n"
871 "--checked or -c\n" 875 "--checked or -c\n"
872 " Insert runtime type checks and enable assertions (checked mode).\n" 876 " Insert runtime type checks and enable assertions (checked mode).\n"
873 "--help or -h\n" 877 "--help or -h\n"
874 " Display this message (add -v or --verbose for information about\n" 878 " Display this message (add -v or --verbose for information about\n"
875 " all VM options).\n" 879 " all VM options).\n"
876 "--package-root=<path> or -p<path>\n" 880 "--package-root=<path> or -p<path>\n"
877 " Where to find packages, that is, \"package:...\" imports.\n" 881 " Where to find packages, that is, \"package:...\" imports.\n"
878 "--packages=<path>\n" 882 "--packages=<path>\n"
879 " Where to find a package spec file.\n" 883 " Where to find a package spec file.\n"
880 "--observe[=<port>[/<bind-address>]]\n" 884 "--observe[=<port>[/<bind-address>]]\n"
881 " Enable the VM service and cause isolates to pause on exit (default port is\n" 885 " The observe flag is used to run a program with a default set of options\n"
882 " 8181, default bind address is 127.0.0.1). With the default options,\n" 886 " for debugging under Observatory. With the default options, Observatory\n"
883 " Observatory will be available locally at http://127.0.0.1:8181/\n" 887 " will be available at http://127.0.0.1:8181/ (default port is 8181,\n"
888 " default bind address is 127.0.0.1). Isolates will pause at exit and\n"
889 " when they throw unhandled exceptions.\n"
884 "--version\n" 890 "--version\n"
885 " Print the VM version.\n" 891 " Print the VM version.\n"
886 "\n" 892 "\n"
887 "--snapshot=<file_name>\n" 893 "--snapshot=<file_name>\n"
888 " loads Dart script and generates a snapshot in the specified file\n" 894 " loads Dart script and generates a snapshot in the specified file\n"
889 "\n" 895 "\n"
890 "--trace-loading\n" 896 "--trace-loading\n"
891 " enables tracing of library and script loading\n" 897 " enables tracing of library and script loading\n"
892 "\n" 898 "\n"
893 "--enable-vm-service[:<port number>]\n" 899 "--enable-vm-service[:<port>[/<bind-address>]]\n"
894 " enables the VM service and listens on specified port for connections\n" 900 " enables the VM service and listens on specified port for connections\n"
895 " (default port number is 8181)\n" 901 " (default port number is 8181, default bind address is 127.0.0.1).\n"
896 "\n" 902 "\n"
897 "The following options are only used for VM development and may\n" 903 "The following options are only used for VM development and may\n"
898 "be changed in any future version:\n"); 904 "be changed in any future version:\n");
899 const char* print_flags = "--print_flags"; 905 const char* print_flags = "--print_flags";
900 Dart_SetVMFlags(1, &print_flags); 906 Dart_SetVMFlags(1, &print_flags);
901 } 907 }
902 } 908 }
903 909
904 910
905 char* BuildIsolateName(const char* script_name, 911 char* BuildIsolateName(const char* script_name,
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 Platform::Exit(Process::GlobalExitCode()); 1537 Platform::Exit(Process::GlobalExitCode());
1532 } 1538 }
1533 1539
1534 } // namespace bin 1540 } // namespace bin
1535 } // namespace dart 1541 } // namespace dart
1536 1542
1537 int main(int argc, char** argv) { 1543 int main(int argc, char** argv) {
1538 dart::bin::main(argc, argv); 1544 dart::bin::main(argc, argv);
1539 UNREACHABLE(); 1545 UNREACHABLE();
1540 } 1546 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698