- 08 7月, 2021 2 次提交
-
-
由 Suzy Mueller 提交于
The code previously expected the server to close when receiving a message that it could not decode. However, there may be changes to the spec that make new requests that we have not handled yet. In that case, it would be preferable to return an error and continue handling incoming requests.
-
由 Suzy Mueller 提交于
-
- 03 7月, 2021 1 次提交
-
-
由 polinasok 提交于
Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
- 02 7月, 2021 1 次提交
-
-
由 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.
-
- 28 6月, 2021 1 次提交
-
-
由 Suzy Mueller 提交于
We can get the throw reason by looking at the argument "s" in runtime.throw. This is not currently working in Go 1.16 or Go 1.17 (see golang/go#46425), but does work in Go 1.15 and Go 1.14
-
- 24 6月, 2021 2 次提交
-
-
由 Suzy Mueller 提交于
Load limit for metadata string is set to MaxStringLen
-
由 Suzy Mueller 提交于
-
- 22 6月, 2021 1 次提交
-
-
由 polinasok 提交于
Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
- 17 6月, 2021 1 次提交
-
-
由 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.
-
- 12 6月, 2021 1 次提交
-
-
由 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
-
- 11 6月, 2021 3 次提交
-
-
由 Suzy Mueller 提交于
Apply a presentation hint to the internal runtime stack frames, so that these can be deemphasized in the UI. This should allow users to more easily inspect their own code, and will keep the option to view those frames if they choose to.
-
由 Suzy Mueller 提交于
If the client supports paging, we allow them to fetch array and slice items in chunks that we assume will be of a reasonable size. For example, VS Code requests indexed variables in chunks of 100. Fixes golang/vscode-go#1518
-
由 polinasok 提交于
Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
- 04 6月, 2021 2 次提交
-
-
由 Suzy Mueller 提交于
-
由 Hyang-Ah Hana Kim 提交于
- add 'clipboard' capability - apply a larger string limit for 'hover' and 'clipboard' context - truncate the string representation of compound (or pointer of compound) type variable
-
- 29 5月, 2021 1 次提交
-
-
由 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
-
- 28 5月, 2021 1 次提交
-
-
由 Hyang-Ah Hana Kim 提交于
If the output binary name does not end with .exe, it can't run on Windows in noDebug mode. If user-provided output name doesn't have file extension name (.exe), append it. Fixes golang/vscode-go#1473
-
- 26 5月, 2021 1 次提交
-
-
由 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
-
- 21 5月, 2021 3 次提交
-
-
由 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.
-
由 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
-
由 Suzy Mueller 提交于
-
- 20 5月, 2021 2 次提交
-
-
由 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
-
由 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.
-
- 19 5月, 2021 1 次提交
-
-
由 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
-
- 18 5月, 2021 7 次提交
-
-
由 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
-
由 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>
-
由 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 ```
-
由 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
-
由 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
-
由 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>
-
由 Suzy Mueller 提交于
-
- 11 5月, 2021 1 次提交
-
-
由 Suzy Mueller 提交于
* service/dap: add type information to dap variables * add comment explaining map type choice * rename to setClientCapabilities * respond to review * update TypeString definition
-
- 07 5月, 2021 1 次提交
-
-
由 Alessandro Arzilli 提交于
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
-
- 06 5月, 2021 1 次提交
-
-
由 Suzy Mueller 提交于
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.
-
- 05 5月, 2021 2 次提交
-
-
由 polinasok 提交于
* service/dap: auto-loading for fully missing pointers, structs, maps, slices and arrays * Add call test * Add TODO Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
由 polinasok 提交于
* service/dap: refine teardown logic * Address review comments + add missing lock/unlock * Narrow lock scope * Update comments only * Remove redundan temp var from stopNoDebugProcess * Clarify comment * service/dap: support running requests asynchronously * Respond to review comments * Remove debugging printf * Refine locking. Add call TODO. Use -1 for running thread id. * Fix TestAttachStopOnEntry: it can terminate on halt * Respond to review comments * Recover panics in async requests handling * defer releasing asyncSetupDone, so it happens on panic Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
- 29 4月, 2021 1 次提交
-
-
由 polinasok 提交于
-
- 27 4月, 2021 1 次提交
-
-
由 Suzy Mueller 提交于
* service/dap: add go build stderr to error response * service/dap: add go build stderr to error response * Skip message check for build errors * test for flag provided message
-
- 23 4月, 2021 1 次提交
-
-
由 Suzy Mueller 提交于
-
- 22 4月, 2021 1 次提交
-
-
由 Alessandro Arzilli 提交于
Due to variable shadowing the SwitchGoroutine command never failed.
-