prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Error reading integer
  From VS (might not be a ptvsd bug, not sure at this point):
  Create new python application
  Add new item, python unit test
  Set the unit test as startup file
  F5
  
  Result:
  ```
  ---------------------------
  Microsoft Visual Studio
  ---------------------------
  Error reading integer. Unexpected token: Boolean. Path 'exitCode'.
  ---------------------------
  OK   
  ---------------------------
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `ptvsd/debugger.py`
  Content:
  ```
  1 # Copyright (c) Microsoft Corporation. All rights reserved.
  2 # Licensed under the MIT License. See LICENSE in the project root
  3 # for license information.
  4 
  5 import sys
  6 
  7 
  8 __author__ = "Microsoft Corporation <ptvshelp@microsoft.com>"
  9 __version__ = "4.0.0a1"
  10 
  11 DONT_DEBUG = []
  12 
  13 
  14 def debug(filename, port_num, debug_id, debug_options, run_as):
  15     # TODO: docstring
  16 
  17     # import the wrapper first, so that it gets a chance
  18     # to detour pydevd socket functionality.
  19     import ptvsd.wrapper
  20     import pydevd
  21 
  22     args = [
  23             '--port', str(port_num),
  24             '--client', '127.0.0.1',
  25             ]
  26     if run_as == 'module':
  27         args.append('--module')
  28         args.extend(('--file', filename + ":"))
  29     else:
  30         args.extend(('--file', filename))
  31     sys.argv[1:0] = args
  32     try:
  33         pydevd.main()
  34     except SystemExit as ex:
  35         ptvsd.wrapper.ptvsd_sys_exit_code = ex.code
  36         raise
  37
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/ptvsd/debugger.py b/ptvsd/debugger.py
  --- a/ptvsd/debugger.py
  +++ b/ptvsd/debugger.py
  @@ -32,5 +32,5 @@
       try:
           pydevd.main()
       except SystemExit as ex:
  -        ptvsd.wrapper.ptvsd_sys_exit_code = ex.code
  +        ptvsd.wrapper.ptvsd_sys_exit_code = int(ex.code)
           raise
  
verification_info: {"golden_diff": "diff --git a/ptvsd/debugger.py b/ptvsd/debugger.py\n--- a/ptvsd/debugger.py\n+++ b/ptvsd/debugger.py\n@@ -32,5 +32,5 @@\n     try:\n         pydevd.main()\n     except SystemExit as ex:\n-        ptvsd.wrapper.ptvsd_sys_exit_code = ex.code\n+        ptvsd.wrapper.ptvsd_sys_exit_code = int(ex.code)\n         raise\n", "issue": "Error reading integer\nFrom VS (might not be a ptvsd bug, not sure at this point):\r\nCreate new python application\r\nAdd new item, python unit test\r\nSet the unit test as startup file\r\nF5\r\n\r\nResult:\r\n```\r\n---------------------------\r\nMicrosoft Visual Studio\r\n---------------------------\r\nError reading integer. Unexpected token: Boolean. Path 'exitCode'.\r\n---------------------------\r\nOK   \r\n---------------------------\r\n```\n", "before_files": [{"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nimport sys\n\n\n__author__ = \"Microsoft Corporation <ptvshelp@microsoft.com>\"\n__version__ = \"4.0.0a1\"\n\nDONT_DEBUG = []\n\n\ndef debug(filename, port_num, debug_id, debug_options, run_as):\n    # TODO: docstring\n\n    # import the wrapper first, so that it gets a chance\n    # to detour pydevd socket functionality.\n    import ptvsd.wrapper\n    import pydevd\n\n    args = [\n            '--port', str(port_num),\n            '--client', '127.0.0.1',\n            ]\n    if run_as == 'module':\n        args.append('--module')\n        args.extend(('--file', filename + \":\"))\n    else:\n        args.extend(('--file', filename))\n    sys.argv[1:0] = args\n    try:\n        pydevd.main()\n    except SystemExit as ex:\n        ptvsd.wrapper.ptvsd_sys_exit_code = ex.code\n        raise\n", "path": "ptvsd/debugger.py"}], "after_files": [{"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nimport sys\n\n\n__author__ = \"Microsoft Corporation <ptvshelp@microsoft.com>\"\n__version__ = \"4.0.0a1\"\n\nDONT_DEBUG = []\n\n\ndef debug(filename, port_num, debug_id, debug_options, run_as):\n    # TODO: docstring\n\n    # import the wrapper first, so that it gets a chance\n    # to detour pydevd socket functionality.\n    import ptvsd.wrapper\n    import pydevd\n\n    args = [\n            '--port', str(port_num),\n            '--client', '127.0.0.1',\n            ]\n    if run_as == 'module':\n        args.append('--module')\n        args.extend(('--file', filename + \":\"))\n    else:\n        args.extend(('--file', filename))\n    sys.argv[1:0] = args\n    try:\n        pydevd.main()\n    except SystemExit as ex:\n        ptvsd.wrapper.ptvsd_sys_exit_code = int(ex.code)\n        raise\n", "path": "ptvsd/debugger.py"}]}