1. 08 7月, 2021 2 次提交
  2. 03 7月, 2021 1 次提交
  3. 02 7月, 2021 1 次提交
    • A
      terminal,service: Add filtering and grouping to goroutines command (#2504) · 7c821642
      Alessandro Arzilli 提交于
      Adds filtering and grouping to the goroutines command.
      
      The current implementation of the goroutines command is modeled after
      the threads command of gdb. It works well for programs that have up to
      a couple dozen goroutines but becomes unusable quickly after that.
      
      This commit adds the ability to filter and group goroutines by several
      different properties, allowing a better debugging experience on
      programs that have hundreds or thousands of goroutines.
      7c821642
  4. 28 6月, 2021 1 次提交
  5. 24 6月, 2021 2 次提交
  6. 22 6月, 2021 1 次提交
  7. 17 6月, 2021 1 次提交
    • A
      terminal,api: move PrintStack function (#2537) · 29825d41
      Alessandro Arzilli 提交于
      Commit 30cdedae introduced a dependency
      from service/dap to pkg/terminal to call a stack printing function,
      it's weird to have code that implements the DAP protocol depend on the
      code for the JSON-RPC client.
      Move PrintStack to a different package that can be called by both.
      29825d41
  8. 12 6月, 2021 1 次提交
    • S
      service/dap: truncate value for expandable types in hover (#2529) · 688f94a4
      Suzy Mueller 提交于
      On hovers, including the full value for complex types is unnecessary, since the user will likely need to expand the children to inspect the values. Additionally, this can really slow down getting the hover values. This change will allow truncating the value in hover if the variable has a variables reference.
      
      Updates golang/vscode-go#1435
      688f94a4
  9. 11 6月, 2021 3 次提交
  10. 04 6月, 2021 2 次提交
  11. 29 5月, 2021 1 次提交
    • S
      pkg/proc: add support for hit count condition breakpoints (#2490) · b2afb7cd
      Suzy Mueller 提交于
      * pkg/proc: implement support for hit count breakpoints
      
      * update comment
      
      * udpate hitcount comment
      
      * update HitCond description
      
      * add test for hit condition error
      
      * respond to review
      
      * service/dap: add support for hit count breakpoints
      
      * use amendbps to preserve hit counts
      
      * update test health doc
      
      * fix failing test
      
      * simplify hit conditions
      
      * REmove RequestString, use name instead
      
      * update backend_test_health.md
      
      * document hit count cond
      
      * fix tests
      b2afb7cd
  12. 28 5月, 2021 1 次提交
  13. 26 5月, 2021 1 次提交
    • H
      dap: use larger string type variable load limits in 'repl', 'variables' context (#2418) · 5e12091d
      Hyang-Ah Hana Kim 提交于
      * dap: use larger variable load limits in 'repl', 'variables' context
      
      When evaluate requests are triggered in the context of 'repl'
      (DEBUG CONSOLE in VSCode) or 'variables' (copy values from VARIABLES
      section in VSCode), they are the result of human action and have
      more rooms to display. So it is not too bad to apply longer limits.
      
      Variable auto-loading for strings or arrays is nice but currently
      it's unclear to me how this should be integrated in the DEBUG
      CONSOLE or with the Copy Value feature. Until we have better ideas
      and tools, let's go with these larger limits.
      
      Unfortunately, the "Copy Value" from WATCH section triggers evaluate
      requests with "watch" context and we don't want to load large data
      automatically for "watch". So, users who want to query a large value
      should first copy the expression to DEBUG CONSOLE and evaluate it.
      Not ideal but not the end of the world either.
      
      Updates golang/vscode-go#1318
      
      * dap: apply large limit only to the string type result
      
      * dap: move string reload logic to convertVariable* where other reload logic is
      
      Currently we are thinking string reload for evaluation as a temporary
      workaround until we figure out an intutitive way to present long strings.
      So, I hope moving this logic near other reload logic may be better.
      
      And, use the address based expression when reloading - when handling the
      function return values, we may not have an expression to use.
      
      * dap: make deep source check happy
      
      * dap: move string reevaluation logic back to onEvaluateRequest
      
      Reloading string variables is tricky if they are in registers.
      We don't attempt to reload them but for clarity, move this up
      to the onEvaluateRequest handler.
      
      For function call, use a generous limit for string load
      since the results are volatile.
      
      * dap: check variable isn't affected by evaluate in other context
      5e12091d
  14. 21 5月, 2021 3 次提交
    • S
      service/dap: remove unnecessary capability check · a25d95bd
      Suzy Mueller 提交于
      The Types field is only set in childrenToDAPVariables if the client
      capability is supported. There is no need to check again after the
      children have been calculated.
      a25d95bd
    • H
      dap: handle SetVariable requests (#2440) · c8934dc3
      Hyang-Ah Hana Kim 提交于
      * dap: handle SetVariable requests
      
      The handler invokes debugger.SetVariableInScope, except for
      string type variables. For which, we rely on the `call` command.
      Moved the call expression handling logic to the new `doCall`
      function, so it can be reused by the SetVariable requenst
      handler.
      
      With this PR, every successful SetVariable request triggers
      a StoppedEvent - that's a hack to reset the variablesHandle
      map internally and notify the client of this change. It will
      be nice if we can just update cached data corresponding to
      the updated variable.  But I cannot find an easy and safe way
      to achieve this yet.
      
      Also fixed a small bug in the call expression evaluation -
      Previously, dlv dap returned an error "Unable to evaluate
      expression: call stopped" if the call expression is for
      variable assignment.  (e.g. "call animal = "rabbit").
      
      * dap: address comments from aarzilli
      
      resetHandlesForStop & sendStoppedEvent unconditionally after
      call command is left as a TODO - This is an existing code path
      (just refactored) and an preexisting bug. Fixing it here
      requires updates in TestEvaluateCallRequest and I prefer
      addressing it in a separate cl.
      
      Disabled call injection testing on arm64. Separated TestSetVariable
      into two, one that doesn't involve call injection and another that
      may involve call injection.
      
      Fixed variableByName by removing unnecessary recursion.
      
      * dap: address polina's comments
      
      - removed the hard reset for every variable set
      - added tests for various variable types
      - added tests that involves interrupted function calls. (breakpoint/panic)
      
      And,
      - changed to utilize EvalVariableInScope to access the variable instead
      of searching the children by name.
      - changed to utilize evaluate requests when verifying whether the variable
      is changed as expected in testing. Since now we avoid resetting the variable
      handles after variable reset, either we need to trigger scope changes
      explicitly, or stop depending on the variables request.
      
      * dap: address comments
      
      - Discuss the problem around the current doCall implementation
      and the implication.
      - Refine the description on how VS Code handles after setVariable
      and evaluate request (there could be followup scopes/evaluate requests).
      - Use the explicit line numbers for breakpoints in the SetVariable tests.
      - Do not use errors.Is - we could've used golang.org/x/xerrors polyfill
      but that's an additional dependency, and we will remove this check once
      tests that depend on old behavior are fixed.
      
      * dap: remove errTerminated and adjust the test
      
      * dap: evaluate in the outer frame, instead of advancing to the next bp
      c8934dc3
    • S
      95674dd4
  15. 20 5月, 2021 2 次提交
    • S
      service/dap: support evaluate for hover context (#2496) · b72bce30
      Suzy Mueller 提交于
      We can support evaluate for hover context in order to provide more
      useful hover info for our users.
      
      Updates go-delve/delve#2491
      Updates golang/vscode-go#1510
      b72bce30
    • H
      dap: add sameuser check (#2494) · 669fc2d8
      Hyang-Ah Hana Kim 提交于
      On linux, delve RPC server allows only connections from the same user
      if --only-same-user is set (true, by default). Do the same for DAP
      server.
      
      Moved the sameuser check logic to service/internal/sameuser.
      Considered importing service/rpccommon from the dap server,
      but when we eventually migrate to multiplex rpc and dap from one
      port, I am afraid that can cause cyclic imports.
      669fc2d8
  16. 19 5月, 2021 1 次提交
    • S
      service/dap: implement function breakpoints (#2450) · 745a5131
      Suzy Mueller 提交于
      * service/dap: implement setFunctionBreakpoints request
      
      * Fix the errors that would not allow func set
      
      * use find locations instead of FindFunctionLocation
      
      * add function breakpoint tests
      
      * return after sending error response
      
      * revert changes to debugger
      
      * exclude regexp function names
      
      * remove switch statement with one case
      
      * remove ReadFile ambiguous test
      
      * Remove TODO for multiple locs
      
      * remove unnecessary setting of bp.Verified on error
      
      * tighten condition for breakpoint name to match function breakpoint
      
      * add tests for different loc types, add FindLocationSpec
      
      * add test using base name of file
      
      * make functionBreakpoint name a constant
      
      * update stop reason to function breakpoint
      
      * remove comment about optimizing onSetFunctionBreakpoints
      
      * respond to review
      
      * add comments to test
      
      * change functionBpPrefix to const
      
      * handle relative paths
      
      * fix capabilites check
      
      * update function breakpoint tests to check for failure
      
      * use negative line number to determine which are errors
      745a5131
  17. 18 5月, 2021 7 次提交
    • S
      service/dap: send 'continued' event on next/step/stepout requests (#2480) · 4e582fa5
      Suzy Mueller 提交于
      * service/dap: send 'continued' event on next/step/stepout requests
      
      Next/step/stepout requests assume that execution is only resumed
      on the thread that was specified. We cannot resume execution on
      only a single thread, so we need to send a continued event to let
      the client know that all threads have resumed.
      
      * update set breakpoints test with continued event
      4e582fa5
    • P
      service/dap: support pause request (#2466) · c10b222b
      polinasok 提交于
      * service/dap: support pause request
      
      * service/dap: validate the client configurations in initialize request (#2435)
      
      The client can specify certain configurations in the initialize request.
      For example, pathFormat determines the pathFormat. We do not currently
      support configuring pathFormat, linesStartAt1, or columnsStartAt1, so
      we report an error if the client attempts to set these to an
      unsupported value.
      
      * TeamCity: fix Windows builds (#2467)
      
      Bintray is shutting down and the URL we used to install mingw is no
      longer available. Use chocolatey instead.
      
      * proc/native: low level support for watchpoints in linux/amd64 (#2301)
      
      Adds the low-level support for watchpoints (aka data breakpoints) to
      the native linux/amd64 backend.
      
      Does not add user interface or functioning support for watchpoints
      on stack variables.
      
      Updates #279
      
      * simplify pause test
      Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
      Co-authored-by: NSuzy Mueller <suzmue@golang.org>
      Co-authored-by: NAlessandro Arzilli <alessandro.arzilli@gmail.com>
      c10b222b
    • J
      service/dap: Fix build error due to unresolved merge conflict (#2493) · 54738875
      John-Michael Faircloth 提交于
      My local build of delve which apparently pulls in the master branch starting breaking. This is the culprit.
      
      Error:
      ```
      #9 75.27 # github.com/go-delve/delve/service/dap
      #9 75.27 /usr/src/github.com/go-delve/delve/service/dap/server.go:107:1: syntax error: unexpected <<, expecting field name or embedded type
      #9 75.27 /usr/src/github.com/go-delve/delve/service/dap/server.go:110:1: syntax error: unexpected ==, expecting field name or embedded type
      #9 75.27 /usr/src/github.com/go-delve/delve/service/dap/server.go:113:1: syntax error: unexpected >>, expecting field name or embedded type
      ```
      54738875
    • S
      service/dap: implement exception info (#2444) · 30cdedae
      Suzy Mueller 提交于
      * service/dap: implement exception info
      
      * remove adding additional thread
      
      * Fix tests
      
      * add exceptionInfo tests
      
      * update comments
      
      * map paths to client paths
      
      * remove launch.json
      
      * remove change to ConvertEvalScope
      
      * correct name of supportsExceptionInfoRequest
      
      * Add TODO for deleting output event
      
      * Print Stack header to buffer
      
      * Try to move resolving exception info to onExceptionInfoRequest
      
      * save the error and return if it is the current thread
      
      * rename thread to g
      
      * findgoroutine returns goroutine
      
      * clean up findgoroutine
      
      * log errors
      
      * remove output event
      
      * fix grammar
      30cdedae
    • S
      service/dap: warn users of debugging optimized functions (#2475) · 1e9c5c3b
      Suzy Mueller 提交于
      * service/dap: warn users of debugging optimized functions
      
      * Add test for optimized scopes
      
      * service/dap: warn users of debugging optimized functions
      
      * rename functionscope
      
      * update warning message
      1e9c5c3b
    • P
      service/dap: support setting breakpoints while running (#2472) · 11cf6e68
      polinasok 提交于
      * service/dap: support setting breakpoints while running
      
      * Review comments, faster test
      
      * Fix comments
      
      * Address review comments
      
      * Do not continue automatically
      
      * Add TODO to resume exeuction
      
      * Handle async test messages in either order
      Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
      11cf6e68
    • S
      32021981
  18. 11 5月, 2021 1 次提交
  19. 07 5月, 2021 1 次提交
  20. 06 5月, 2021 1 次提交
  21. 05 5月, 2021 2 次提交
  22. 29 4月, 2021 1 次提交
  23. 27 4月, 2021 1 次提交
  24. 23 4月, 2021 1 次提交
  25. 22 4月, 2021 1 次提交