- 01 7月, 2022 2 次提交
-
-
由 Ankit Jain 提交于
-
由 Thays Grazia 提交于
* When we don't have pdb we still can get some information about the methods like attributes (public, private, protected, etc) which are used for a better debugger experience. * Update src/mono/wasm/debugger/tests/debugger-test-with-pdb-deleted/debugger-test-with-pdb-deleted.csproj Co-authored-by: NAnkit Jain <radical@gmail.com> Co-authored-by: NAnkit Jain <radical@gmail.com>
-
- 09 6月, 2022 1 次提交
-
-
由 Ilona Tomkowicz 提交于
-
- 08 6月, 2022 1 次提交
-
-
由 Ilona Tomkowicz 提交于
* Basic testcase. * Fixed non-null access to proxy-hidden members. * Fixing the issue and adding more tests. * Fixed a failing test: let CompileAndRunTheExpression throw. * Blocked failing tests on firefox. * Applied @radical's suggestions. * Reverted indexing to fix tests. * Reverted LastOrDefault instead of indexing + corrected names. * Changed to throw when root name empty. * Removing null suppression that does not change the evaluation result but fails without this change. * Applied @radical's comments. * Change exception on string property evaluation. * Added @radical's suggestions. Co-authored-by: NAnkit Jain <radical@gmail.com>
-
- 07 6月, 2022 1 次提交
-
-
由 Thays Grazia 提交于
* Implementing support new method on enc * HotReload - Support new static method * - Fix adding a new static field in an class not initialized - Returning the number of the fields in the class including the ones added by hotreload. * Fix GetStringAfterEnc. Add a test with 2 enc adding classes in both of them. Adding in the dump changes typedef added. * Fix space between function and ( * Removing try catch. * Fix compilation * Remove unnecessary if. * Adressing @lambdageek comments and adding a test for it. * Addressing @radical comments. * Renaming method. * Counting row indices per-kind. * Addressing @radical comments. * Apply suggestions from code review Co-authored-by: NAnkit Jain <radical@gmail.com> * Addressing @radical comments. * Fix methodDebugInformation.Document.IsNil. Co-authored-by: NAnkit Jain <radical@gmail.com>
-
- 06 6月, 2022 1 次提交
-
-
由 Ilona Tomkowicz 提交于
* Added DIM tests. * Addressed @radical's suggestions. * Block failing firefox tests.
-
- 27 5月, 2022 1 次提交
-
-
由 Ilona Tomkowicz 提交于
* Prepared tests with the same members as in Console App. * Adding parents' members to match the expected result in tests. * Increasing the timeout because some EvaluateOnCallFrameTests tests take up to 63 sec. * Reverting timeout editions. * Applied refactoring suggestions from @radical and @thaystg. * Added new text cases with addnotation which fields are displayed incorrectly and should be fixed. * More detailed error message for count mismatch. * Reorganising tests with order: grouping similar members. * Fixing override/new problem. * Fixing test to reflect ConsoleApp behavior. * Wrong name - it should be tested with the new class: 2. * Applied @radical's suggestion about backingField. * @radical's changes - refactor + one new test case. * Checking Getter vals; AssertEqual(cnt) not needed. * New test cases, some to be fixed in the follow-up issue. * Added @radical's suggestions. * Different DataTimes for each property.
-
- 26 5月, 2022 2 次提交
-
-
由 Ilona Tomkowicz 提交于
* Test expanding the properties of a result returned by a method evaluated on a primitive type. * Enable caching evaluationResult in scopeCache. * Cache arrays that are returned as a method evaluation result. * Enable getting evaluationResults from cache on request. * Fixed Firefox test.
-
由 Ankit Jain 提交于
First attempt at implementing a wasm app host Regular dotnet apps can be run with `dotnet run`. But this is not the case for wasm apps. We use `xharness` to run the test apps that we generate for library tests. Templates for browser, and console wasm projects were added recently, but they have to be run manually by either invoking a v8 script, or running a `http-server` in the bundle directory. Though to use a debugger with this requires starting the debug proxy separately, and connecting few bits. # WasmAppHost This PR adds a new `WasmAppHost`, which can be used through `dotnet run`: - it can run "wasm app" from it's `AppBundle` directory, using various hosts like `v8`, `node`, or a browser. An example use: ``` $ dotnet new wasmconsole $ dotnet run WasmAppHost --runtime-config /tmp/c0/bin/Debug/net7.0/browser-wasm/AppBundle//c0.runtimeconfig.json [02:26:40] info: host[0] Running: node main.cjs [02:26:40] dbug: host[0] Using working directory: /tmp/c0/bin/Debug/net7.0/browser-wasm/AppBundle Incoming arguments: Application arguments: Debugger.Debug: DEBUGGING ENABLED mono_wasm_runtime_ready fe00e07a-5519-4dfe-b35a-f867dbaf2e28 Could not find symbols file dotnet.js.symbols. Ignoring. Initializing..... Hello, Console! ``` The console template project is run with `node` by default. - it supports a `--debug` parameter, which (for the browser case) would startup a webserver, and the debug proxy for Chrome, and firefox. ``` $ dotnet new wasmbrowser $ dotnet run --debug WasmAppHost --runtime-config /workspaces/test/br0/bin/Debug/net7.0/browser-wasm/AppBundle//br0.runtimeconfig.json --debug --forward-console Debug proxy for chrome now listening on http://127.0.0.1:9300/. And expecting chrome at http://localhost:9222/ Hosting environment: Production Content root path: /workspaces/test/br0/bin/Debug/net7.0/browser-wasm/AppBundle Now listening on: http://127.0.0.1:9300 Debug proxy for firefox now listening on tcp://127.0.0.1:6300. And expecting firefox at port 6000 . App url: http://127.0.0.1:9000/index.html App url: https://127.0.0.1:38331/index.html ``` - This enables using `dotnet run` with wasm samples, and library tests too. ## How do I try this out? You'll need a dotnet with the updated packs. For now, you can use: ``` $ ./dotnet.sh build -p:TargetOS=Browser -p:TargetArchitecture=wasm -p:Configuration=Release src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj /t:InstallWorkloadUsingArtifacts ``` .. which would install a sdk in `artifacts/bin/dotnet-workload` with all the packs installed. - Use that dotnet to create console, or browser wasm apps from templates, for example `dotnet new wasmconsole`, or `dotnet new wasmbrowser`. ### Debugging library tests ``` runtime$ ./artifacts/bin/dotnet-workload/dotnet run -f net7.0 -r browser-wasm -c $YourRuntimeConfig --project src/libraries/System.Buffers/tests/System.Buffers.Tests.csproj -p:DebuggerSupport=true --debug --host browser ``` - If the runtime was built in `Release` config, then you need to add `-p:DebuggerSupport=true`, so the pdbs would get deployed - And use `--debug` to start the debugger - Opening the url will show a `Run tests` button, which you can click after connecting with the IDE, to start running the tests ## Notes, and TODO - `WasmAppHost`, along with the debug proxy are bundled in the `WebAssembly.Sdk` pack right now. - This might be changed in the future to use the dotnet app host pack pattern, and with additional support adding in the Sdk. - This would also allow using `launchSettings.json`, similar to blazor - `WasmAppHost` depends on host config in `runtimeconfig.json`, which can be controlled by a `runtimeconfig.template.json` in the project directory. - Needs more tests, cleanup, `--help` for command line arguments - `app-support.*js` in templates, and `test-main.js` need more work to share the code Fixes https://github.com/dotnet/runtime/issues/67236
-
- 20 5月, 2022 1 次提交
-
-
由 Levi Broderick 提交于
-
- 18 5月, 2022 2 次提交
-
-
由 Ilona Tomkowicz 提交于
-
由 Ankit Jain 提交于
* [wasm][debugger] Extract the main run loop from DevToolsClient, and .. DevToolsProxy into a separate class, which would allow having the same features, and having only one place for the fixes. * Fix harness tests * fix merge error
-
- 16 5月, 2022 1 次提交
-
-
由 Ilona Tomkowicz 提交于
* Refactor. * Applied @radical's suggestions about expression body. * On refactor-createjobj-66068: Applied @radical's https://github.com/radical/runtime/commit/69f5cea4dfe30f3dbd74333b1b23fd8feb665e18. * Revert test fix and separate it to another PR. * Reverted whitespaces. * Overlooked whitespaces - undo. * Made static what can be static. * Removed whitespaces. * Removed whitespaces. * Blocked tests failing on Firefox.
-
- 13 5月, 2022 2 次提交
-
-
由 Ilona Tomkowicz 提交于
* Prepared tests for calling method on primitive types. * Added support for most methods on primitives. * Corrected other tests - TBool is supported. * Corrected test to match current exception texts. * Fixed evaluation with enums. * Fixed another error message to match. * Fixed firefox test on EvaluateMethodsOnPrimitiveTypesReturningPrimitives. * Revert moving ContinueWith() out of the try block. * Removed comment that is not longer true after 2fef3c218b5bca5494797e1134da64e62d433418. * Applied radical's suggestions.
-
由 Ankit Jain 提交于
* [wasm] Move the browser provisioning stuff to a new targets file .. from `DebuggerTestSuite.csproj`. This will allow other projects to use this too. * [wasm][debugger] Handle failure to connect to the browser * [wasm] Improve the browser path lookup so it can be used outside the debugger tests project too. For example, with Wasm.Build.Tests+playwright . * [wasm][debugger] Throw exceptions from tasks correctly .. using `ExceptionDispatchInfo.Capture` so we get the original stack trace. * [wasm][debugger] General improvements in debug proxy - like logging - updated API to make it easier to use by other projects, like the upcoming wasm-app-host . * [wasm][debugger] Add support for setting an automatic breakpoint .. on the first line of the entrypoint method (`Main`). This will be useful for debugging with the upcoming wasm-app-host, along with the use of `wait-for-debugger`. Implemented by @thaystg . * [wasm][debugger] Add support for wait_for_debugger If requested, then it will cause invocation of `main` to be delayed till a debugger is attached. Implemented by @thaystg * [wasm] Cleanup in Wasm.Build.Tests .. in the lead up to wasm-app-host tests. * [wasm] Update the default paths used to trigger builds on CI .. to include templates, and provisioning props. * disable non-wasm builds * [wasm][debugger] Fix path to artifacts dir * [wasm] Emit message with bundle path * [wasm][templates] Make the project use the target dir's name as the .. project name, instead of always creating `browser.dll`, and `console.dll`. * [wasm][debugger] Use a single static instance of HttpClient .. as recommended by the documentation. * Revert "disable non-wasm builds" This reverts commit 7b8b60d58c886e7e66cf2fea910f1feb4d6374f1. * Address review feedback, and improve the autogenerated bpid
-
- 10 5月, 2022 1 次提交
-
-
由 Ankit Jain 提交于
* Clean up debug messages * [wasm][debugger][tests] Allow MonoProxy instances to get gc'ed In `TestHarnessProxy`, we recently started adding proxy instances to a static table, to enable getting the correct exit state from the client. But the instances were not removed from the table, which prevented the GC from collecting them. This manifests as the test process crashing on systems with 8GB of memory, when running `EvaluateOnCallFrameTests`. It would end up getting to a resident size of 2.2-2.7G, and then crash after about 30 tests. With these changes, the proxy gets collected, and the resident memory hovers around 500M. Future work: this will change once we start using the upcoming app host work, and thus moving the proxy to a separate process via `dotnet run --debug`.
-
- 05 5月, 2022 1 次提交
-
-
由 Ilona Tomkowicz 提交于
* Merge main with @radical's refactoring. * Fixed most tests. * Added more Browsable tests: null + valuetype. * Fixed trailing spaces and exposed the test. * Fixed all GetPropertiesTests. * Fixing RunOnCFOValueTypeResult. * Fixed cloning to be deep. * Reverted comments in test. * Fixed browsable root hidden tests. * Extended Browsable tests with a structure. * Fixed TestSetValueOnObject. * Add class testcase to browsable root hidden. * All existing tests are passing. * Cleanup, removing unused code. * Added Browsable tests for nonstatic structures. * Removed unnecessary comment. * Removed whitespaces. * Blocked tests failing/timeouting on Firefox.
-
- 28 4月, 2022 2 次提交
-
-
由 Thays Grazia 提交于
-
由 Thays Grazia 提交于
-
- 27 4月, 2022 2 次提交
-
-
由 Thays Grazia 提交于
* Addressing what was discussed with @lewing offline. * Addressing comments from code review and fixing merge. * Fix merge * Fixing merge * Fix merge
-
由 Thays Grazia 提交于
* First compiling and working version just proxying messages. * almost working, already showing the cs files * Working on firefox. * Use internal e not public. * Debugging on firefox working. * Working after the merge * Keep the TcpListener open and use a random port. * Show null value. * - Show JS Callstack - Skip properties - Get array value from evaluateAsyncJS and not use the preview value. * Fix compilation * Infrastructure to run debugger tests. * fix merge * run test. * Skipping tests that are not passing on Firefox. * Skipping tests that are not passing on Firefox. * Passing 13 steppingtests. * Passing 13 steppingtests. * Passing 13 steppingtests. * Failed: 0, Passed: 39, Skipped: 203, Total: 242, Duration: 5 m 6 s - DebuggerTestSuite.dll (net6.0) * Failed: 0, Passed: 66, Skipped: 195, Total: 261, Duration: 9 m 29 s - DebuggerTestSuite.dll (net6.0) * Using ConditionalTheory and ConditionalFact implemented by @radical. * Fixing side effect. * Implemented conditional breakpoints. Failed: 0, Passed: 74, Skipped: 189, Total: 263, Duration: 8 m 41 s - DebuggerTestSuite.dll (net6.0) * Fix special characters and pointers. Failed: 0, Passed: 116, Skipped: 177, Total: 293 * Fix merge * Run debugger-tests on firefox using codespace * Starting firefox correctly not stopping in the breakpoint yet. * Remove unnecessary change * Fix pause behavior (now showing correctly, pause on breakpoint, pause while stepping) Start implementing evaluate expressions, working correctly on VSCode. * Fix local tests. * Fix missing ) * Passing 190 tests, evaluate expressions working. * Remove Task.Delays. Move some attributes from FirefoxMonoProxy to FirefoxExecutionContext. * Fix container creation * Trying to run firefox tests on CI. * Moving file to the right place. * Trying to run debugger-tests using firefox on CI. * fixing path * Missing url to download firefox on helix. * On run the tests only on linux. * Trying to download firefox on helix. * fix error on helix-wasm.targets. * trying to fix ci * trying to install firefox on helix. * Fixing firefox path * Fix debugger tests on firefox * fixing profile path * Install libdbus-glib-1-2 on docker and on codespace * Trying to run using firefox on CI * update docker image * Adding more messages to see errors on CI * Trying to make it work on CI * Real test on CI * Trying to use the firefox machine only to run firefox tests Retrying connection to Proxy Remove extra messages added to help to fix CI * Fix CI * Fix CI * Fix CI. * Remove unnecessary changes. * Using machine with sudo installed * Addressing @lewing comments * Fix run tests on codespace Using image with python3 * Use default image to build and new image only to run firefox tests * Fix unrelated change * Fix ci * check python version * Print python versions * Using image with PIP installed * Using image with pip updated * Remove unrelated changes Increase time to wait for firefox to be ready * Trying to fix evaluate tests. * Fix evaluateoncallframe tests * Trying to fix evaluation tests. * trying to fix evaluateoncallframetests * fiz evaluateoncallframetests * Trying to kill firefox to avoid errors. * Trying to fix EvaluateOnCallFrameTests * Fix CI * Remove failing test * Fix misctests * Fix other build errors. * Trying to fix CI. * Fix CI * Remove unecessary message. * Update src/tests/BuildWasmApps/Wasm.Debugger.Tests/Wasm.Debugger.Tests.csproj Co-authored-by: NAnkit Jain <radical@gmail.com> * Addressing @radical comments * Merge error while accept @radical suggestion * Merge error while accept @radical suggestion * Update src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs Co-authored-by: NAnkit Jain <radical@gmail.com> * Apply suggestions from code review Co-authored-by: NAnkit Jain <radical@gmail.com> * Addressing @radical comments * Abort the tcp connection if the proxy throws an exception * Refactor a bit * Use more compile time checks for chrome vs firefox * fix pipeline * Make debugger job names unique by including the browser * fix runtime-wasm pipeline * fix firefox ci job * split into more files * cleanup * Add support for running chrome, and firefox tests in the same job * fix yml * fix build * fix build * fix windows build * Don't delete profile folder nor pkill firefox * Delete and create a new profile folder for each execution * fix helix command line * [wasm][debugger] Fix tests broken on 'main' This test broke because it was checking for the number of members on `System.TimeSpan`, and that changed with https://github.com/dotnet/runtime/pull/67666 , which added new members like `TotalNanoseconds`. The test shouldn't depend on this number anyway, so remove that. ``` Failed DebuggerTests.MiscTests.InspectLocalsForToStringDescriptions(line: 137, col: 12, method_name: "MethodWithLocalsForToStringTest", call_other: False, invoke_async: False) [758 ms] Error Message: [ts_props] Number of fields don't match, Expected: 12, Actual: 16 Expected: True Actual: False Stack Trace: at DebuggerTests.DebuggerTestBase.CheckProps(JToken actual, Object exp_o, String label, Int32 num_fields) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 800 at DebuggerTests.DebuggerTestBase.CompareObjectPropertiesFor(JToken locals, String name, Object o, String label, Int32 num_fields) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 908 at DebuggerTests.MiscTests.InspectLocalsForToStringDescriptions(Int32 line, Int32 col, String method_name, Boolean call_other, Boolean invoke_async) in /_/src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs:line 559 ``` * wip * big refactor * chrome runs * ff runs * ff runs * cleanup * cleanup * cleanup * change console verbosity to info, for proxy * More refactoring * More refactoring, and fix some issues with connections, and other cleanup * some cleanup * fix file name * Improve cleanup after tests * some refactoring, fixing some hangs, faster failures etc * Fix BrowserCrash test for chrome * fix up logging * Improve error handling for the proxy running independently * fix debugging from vscode * proxy host: add --log-path for logs * support canceling for the proxy host too, and distinguish different instances of the proxy * Fix debugger after refreshing the debugged page. * Fixing chrome debugging. * Fix startup to work on chrome and also on firefox. Co-authored-by: NAnkit Jain <radical@gmail.com>
-
- 23 4月, 2022 1 次提交
-
-
由 Ankit Jain 提交于
* [wasm][debugger] Fix a randomly failing JS test `DebuggerTests.ExceptionTests.JSExceptionTestAll` can some times fail with: ``` [xUnit.net 00:01:08.51] DebuggerTests.ExceptionTests.JSExceptionTestAll [FAIL] Failed DebuggerTests.ExceptionTests.JSExceptionTestAll [105 ms] Error Message: [{ "callFrameId": "-2618252572970282349.1.0", "functionName": "lookup", ... Expected: exception_caught_test Actual: lookup Stack Trace: at DebuggerTests.DebuggerTestBase.AssertEqual(Object expected, Object actual, String label) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 1119 at DebuggerTests.DebuggerTestBase.SendCommandAndCheck(JObject args, String method, String script_loc, Int32 line, Int32 column, String function_name, Func`2 wait_for_event_fn, Func`2 locals_fn, String waitForEvent) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 562 at DebuggerTests.DebuggerTestBase.EvaluateAndCheck(String expression, String script_loc, Int32 line, Int32 column, String function_name, Func`2 wait_for_event_fn, Func`2 locals_fn) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 542 at DebuggerTests.ExceptionTests.JSExceptionTestAll() in /_/src/mono/wasm/debugger/DebuggerTestSuite/ExceptionTests.cs:line 70 ``` This test is set to pause on every exception thrown, but the test assumes that the first exception that it gets will be the expected one. But we can get other JS exceptions before that. So, wait for the correct one, while ignoring any *js* ones. * cleanup
-
- 15 4月, 2022 1 次提交
-
-
由 Ankit Jain 提交于
This test broke because it was checking for the number of members on `System.TimeSpan`, and that changed with https://github.com/dotnet/runtime/pull/67666 , which added new members like `TotalNanoseconds`. The test shouldn't depend on this number anyway, so remove that. ``` Failed DebuggerTests.MiscTests.InspectLocalsForToStringDescriptions(line: 137, col: 12, method_name: "MethodWithLocalsForToStringTest", call_other: False, invoke_async: False) [758 ms] Error Message: [ts_props] Number of fields don't match, Expected: 12, Actual: 16 Expected: True Actual: False Stack Trace: at DebuggerTests.DebuggerTestBase.CheckProps(JToken actual, Object exp_o, String label, Int32 num_fields) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 800 at DebuggerTests.DebuggerTestBase.CompareObjectPropertiesFor(JToken locals, String name, Object o, String label, Int32 num_fields) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 908 at DebuggerTests.MiscTests.InspectLocalsForToStringDescriptions(Int32 line, Int32 col, String method_name, Boolean call_other, Boolean invoke_async) in /_/src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs:line 559 ```
-
- 13 4月, 2022 1 次提交
-
-
由 Ankit Jain 提交于
`debugger-driver.html` was changed in ae5d422e873016d558db236d15c135453b8d603d, but not all the line numbers in JSConditionalBreakpoint were updated. This can cause the breakpoint to not be hit, and the test to timeout instead.
-
- 05 4月, 2022 1 次提交
-
-
由 Ankit Jain 提交于
* [wasm] Bump timeout for debugger tests to 30mins, to accomodate EvaluateOnCallFrameTests * [wasm][debugger] statically init App.static_method_table `debugger-driver.html` has a `App.init` function (called from `onDotnetReady`) that init's `App.static_method_table`. But this function can race with a test, which might call `invoke_static_method`, and that would fail because `App.static_method_table` is not defined yet. * Improve logging slightly to help debug random failures * Update line numbers in tests
-
- 30 3月, 2022 1 次提交
-
-
由 Ilona Tomkowicz 提交于
* Removed a dedicated StructGetter class. * Used DerivedClass in protection level tests + fixed InvokeMethod + reverted StructureGetters removal. * Exchange ElementType in DotnetObjectId for bool. * Applied @radical's suggestion to log whole call stack instead of message. * Applied @lewing's suggestions. * Merge errors fixed.
-
- 29 3月, 2022 1 次提交
-
-
由 Ankit Jain 提交于
* [wasm] Mark result as Error if it has 'exceptionDetails' field * [wasm] Don't swallow errors from methods that enumerate properties .. like for getting locals. Instead, surface the original errors which have details of the actual failure, to the point before we send a response. This helps debugging a lot, so instead of `Unable to evaluate dotnet:scope:1`, we get more detailed errors. * [wasm] Throw an exception when a debugger agent command fails We are checking `HasError` property on the binary reader in very few places. Other places just try to use the reader which then fails with errors in reading, or base64 conversion etc, and we don't get any info about what command failed. Instead, throw an exception on error by default. But the existing locations that do check `HasError`, don't throw for them. * [wasm] Fix evaluating expression calling a non-existant method Issue: https://github.com/dotnet/runtime/issues/65744 The test doesn't fail because it is expecting an error, and it gets that. But the log shows an assertion: `console.error: * Assertion at /workspaces/runtime/src/mono/mono/metadata/class-accessors.c:71, condition `<disabled>' not met` 1. This is because the debugger-agent does not check that the `klass` argument is NULL, which is fixed by adding that check. 2. But the reason why this got called with `klass==NULL`, is because `MemberReferenceResolver.Resolve` tries first to find the non-existant method on the type itself. Then it tries to find the method on `System.Linq.Enumerable`, but fails to find a typeid for that. - but continues to send a command to get the methods on that `linqTypeId==0`. * [wasm] Add some missing exception logging in the proxy * cleaup * [wasm] GetMethodIdByName: throw on invalid type ids * [wasm] Improve error handling in expression evaluation * Cleanup * Disable failing test - https://github.com/dotnet/runtime/issues/65881 * Add missed files * Address @ilonatommy's feedback
-
- 18 3月, 2022 1 次提交
-
-
由 Thays Grazia 提交于
* Show the callstack as it's shown on net5. * Addressing @lewing and @radical comments. * addressing @lewing comment.
-
- 02 3月, 2022 1 次提交
-
-
由 Ilona Tomkowicz 提交于
* Optional parameter fix. * Working version of optional parameter support, requires refactoring. * Refactored. * Fixed failing tests. * Add support to functions returning char, add test to an existing case. * Simplified tests. * Merged with optional params, uncommented char test * Remove spaces. * Applied @radical's suggestions. * Removed indentation. * Another indentation. * Removed comment. * Reverted type=char, as @radical suggested. * Applied @radical's suggestions. No need for escaping + reverting original name.
-
- 25 2月, 2022 1 次提交
-
-
由 Ilona Tomkowicz 提交于
* Tmp change for debugging. * Added chromium, needed for running debugger tests. * Corrected line breaking, removed suso. * Removed update duplicate. * Prevent regex on null. * Set special env variable only for containers. * Locally docker build crashes without it. * Applied @eerhardt suggestion. * Moved env assignment to a place that is executed by onCreateCommand.sh * Revert accidential new line removal. * Upgrade is unnecessary, works without it. * Moved all logic to C# code. * Remove duplicated line. * Applied @thays's and @lewing's comments. * Enabling @radical approach for chromium installation. Co-authored-by: NAnkit Jain <radical@gmail.com>
-
- 24 2月, 2022 3 次提交
-
-
由 Ilona Tomkowicz 提交于
* Optional parameter fix. * Working version of optional parameter support, requires refactoring. * Refactored. * Fixed failing tests. * Simplified tests. * @radical's parenthesis refactor. Co-authored-by: NAnkit Jain <radical@gmail.com> * Add nullable tests, rename mixed params function. * Applied @radical suggestions + fixed tests failing because of double separator. * Capitalised params first letter, removed explicit getters. * Applied @radical's and @lewing's comments where it was possible. * Applied @radical's suggestions. * Handle Linq with ParamsCnt = methodParamsCnt. OptionalParamsCnt not used anymore. * Fix: previos commit worked only in tests, not in browser. * Applied @radical's approach. * Fixed ParamsInfo so that it will be loaded on demand only. * Update src/mono/wasm/debugger/tests/debugger-test/debugger-evaluate-test.cs Co-authored-by: NAnkit Jain <radical@gmail.com> Co-authored-by: NAnkit Jain <radical@gmail.com>
-
由 Ankit Jain 提交于
* [wasm][debugger] Fail test if an assertion is detected * [wasm][debugger] Make DevToolsProxy's `pending_ops` thread-safe Currently, `pending_ops` can get written by different threads at the same time, and also read in parallel. This causes tests to randomly fail with: ``` DevToolsProxy::Run: Exception System.ArgumentException: The tasks argument included a null value. (Parameter 'tasks') at System.Threading.Tasks.Task.WhenAny(Task[] tasks) at Microsoft.WebAssembly.Diagnostics.DevToolsProxy.Run(Uri browserUri, WebSocket ideSocket) in /_/src/mono/wasm/debugger/BrowserDebugProxy/DevToolsProxy.cs:line 269 ``` Instead, we use `Channel<T>` to add the ops, and then read those in the main loop, and add to the *local* `pending_ops` list. * [wasm] Install chrome for debugger tests - controlled by `$(InstallChromeForDebuggerTests)` which defaults to `true` for non-CI docker containers - Useful for using the correct chrome version when testing locally, or on codespaces - Also, add support for detecting, and defaulting to such an installation * [wasm][debugger] Disable tests failing with runtime assertions `DebuggerTests.EvaluateOnCallFrameTests.EvaluateSimpleMethodCallsError`: https://github.com/dotnet/runtime/issues/65744 `DebuggerTests.ArrayTests.InvalidArrayId`: https://github.com/dotnet/runtime/issues/65742 * [wasm][debugger] Fix NRE with `"null"` condition for a breakpoint `ConditionalBreakpoint` test fails. The test with condition=`"null"` failed with a NRE, instead of correctly handling it as a condition that returns null. ``` Unable evaluate conditional breakpoint: System.Exception: Internal Error: Unable to run (null ), error: Object reference not set to an instance of an object.. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.WebAssembly.Diagnostics.EvaluateExpression.CompileAndRunTheExpression(String expression, MemberReferenceResolver resolver, CancellationToken token) in /workspaces/runtime/src/mono/wasm/debugger/BrowserDebugProxy/EvaluateExpression.cs:line 399 --- End of inner exception stack trace --- at Microsoft.WebAssembly.Diagnostics.EvaluateExpression.CompileAndRunTheExpression(String expression, MemberReferenceResolver resolver, CancellationToken token) in /workspaces/runtime/src/mono/wasm/debugger/BrowserDebugProxy/EvaluateExpression.cs:line 407 at Microsoft.WebAssembly.Diagnostics.MonoProxy.EvaluateCondition(SessionId sessionId, ExecutionContext context, Frame mono_frame, Breakpoint bp, CancellationToken token) in /workspaces/runtime/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs:line 801 condition:null ``` * [wasm] Improve default message for ReturnAsErrorException, .. since we seem to be not catching them as intended in many places. * [wasm] Better log, and surface errors in evaluation conditional .. breakpoints. Catch the proper exception `ReturnAsErrorException`, so we can get the actual error message. And log that as an error for the user too. * [wasm][debugger] Allow setting proxy port for BrowserDebugHost .. with `--proxy-port=<port>`. Fixes https://github.com/dotnet/runtime/issues/65209 . * [wasm][debugger] Handle errors in getting value for locals Essentially, catch, and skip. * message cleanup * remove trailing space
-
由 Ankit Jain 提交于
* [wasm][debugger] Add test ids, and log test output, and proxy messages .. to files. * log level cleanup * [wasm][debugger] Allow setting proxy port for BrowserDebugHost .. with `--proxy-port=<port>`. Fixes https://github.com/dotnet/runtime/issues/65209 .
-
- 23 2月, 2022 1 次提交
-
-
由 Ankit Jain 提交于
- Discoverer for `ActiveIssue` doesn't seem to be running, so that is not working right now. - Only, `ConditionalFact`, and `ConditionalTheory` work
-
- 17 2月, 2022 1 次提交
-
-
由 Ilona Tomkowicz 提交于
* Fixed surfacing ReturnAsError exceptions to browser and VS. * Added stack trace to the custom exception. * Update src/mono/wasm/debugger/BrowserDebugProxy/EvaluateExpression.cs Typo fix, thanks @lewing. Co-authored-by: NLarry Ewing <lewing@microsoft.com> * Removed unnecessary changes. * Refactor. * Restored exception throwing on both null arguments. * Update src/mono/wasm/debugger/BrowserDebugProxy/EvaluateExpression.cs Co-authored-by: NLarry Ewing <lewing@microsoft.com> * Applied @radical suggestions. * Getter fix. * Arguments reduction. * Remove IsErr. Co-authored-by: NLarry Ewing <lewing@microsoft.com>
-
- 10 2月, 2022 1 次提交
-
-
由 Ilona Tomkowicz 提交于
[wasm][debugger] Fixed debugger attachment to a project with special characters in the path. (#64527) * Fixed special path. * Prevent tests from failing. * Fix for related but not loaded assemblies with special characters. * Refactor - changing slash direction is not necessary. * Undo unnecessary refactoring. * Added test for setting breakpoint in a source with path with special characters. * dummy commit * Adressed @radical's suggestions. * Add more logged info for failing tests. * Direct string comparison is not a good idea - locally they are coded and on CI they are not. * avoid calling pdb2pdb. Co-authored-by: NAnkit Jain <radical@gmail.com> Co-authored-by: NDESKTOP-GEPIA6N\Thays <thaystg@gmail.com>
-
- 04 2月, 2022 1 次提交
-
-
由 Ankit Jain 提交于
* re-enable some tests * [wasm][debugger] Fix racy test - ExceptionTestAllWithReload This test is set up to pause on all exceptions. So, it has some code to hit `Debugger.resume` 100 times, hoping to skip all the non-user code exceptions. But this can sometimes not be enough, and you might have more exceptions which breaks rest of the test. Instead, we try to resume till we won't get paused for a period of 10secs. And after that, we can call the user code, and execute rest of the test. Fixes https://github.com/dotnet/runtime/issues/62666 . * [wasm][debugger] Fix racy tests that use late loaded assemblies `DebuggerTests.MiscTests.DebugLazyLoadedAssemblyWithEmbeddedPdb` `DebuggerTests.BreakpointTests.BreakpointInAssemblyUsingTypeFromAnotherAssembly_BothDynamicallyLoaded` These tests load assemblies dynamically, and depend on breakpoints in those assemblies being resolved. But the tests don't wait for that to happen. So, they can some times fail when the managed method is invoked before the breakpoint being resolved. Fixes https://github.com/dotnet/runtime/issues/62823 Fixes https://github.com/dotnet/runtime/issues/62667
-
- 03 2月, 2022 3 次提交
-
-
由 Ankit Jain 提交于
* [wasm][debugger] Fix racy page reload test `BreakpointTests.CreateGoodBreakpointAndHitGoToWasmPageWithoutAssetsComeBackAndHitAgain` 1. the test loads the regular app page 2. then it reloads the page by calling `load_wasm_page_without_assets()` a. then waits for 1 sec 3. then it reloads again by calling `reload_wasm_page()` a. then `insp.WaitFor(Inspector.READY)` the READY notification after the second reload is never read. Instead, it tries to wait for the notification after the third reload, but that immediately returns because of the second one, instead of waiting for a new one. Fix is to correctly wait for a READY after the second reload. Another way to do this might be to clear the notifications when a new page gets loaded (`executionContextCreated`?), but that would be a bit magical, and isn't needed by any test right now. Fixes https://github.com/dotnet/runtime/issues/64585 * [wasm][debugger] Fix racy test - ExceptionTestAllWithReload This test is set up to pause on all exceptions. So, it has some code to hit `Debugger.resume` 100 times, hoping to skip all the non-user code exceptions. But this can sometimes not be enough, and you might have more exceptions which breaks rest of the test. Instead, we try to resume till we won't get paused for a period of 10secs. And after that, we can call the user code, and execute rest of the test. Fixes https://github.com/dotnet/runtime/issues/62666 . * Revert "[wasm][debugger] Fix racy test - ExceptionTestAllWithReload" This reverts commit 10d40720dec3410bc9944d159d374223a53f7d67.
-
由 Ankit Jain 提交于
-
由 Thays Grazia 提交于
* Implement Set Next Instruction Pointer. * Addressing @radical comments. * Checking if the line number is inside the same function. Adding test for it. Adding test for moving the IP to a line that has already a breakpoint. * Creating tests in async function and lambda as suggested by @radical * Addressing @radical comments. * Addressing @radical comments offline * Adding comment to explain dual invocations. * Removing unnecessary code. * Addressing @radical comments. * Update src/mono/wasm/debugger/BrowserDebugProxy/MonoSDBHelper.cs Co-authored-by: NAnkit Jain <radical@gmail.com> * Addressing @radical comments. * Apply suggestions from code review Co-authored-by: NAnkit Jain <radical@gmail.com> * Removing unnecessary code.Addressing @radical comments. * Addressing @radical comments. * Added test as suggested offline by @radical * Creating tests as suggested by @radical. * Adding test as suggested by @radical. Fixing behavior of this new test: moving IP to a nested function. * Changing order in test. * Creating new test suggested by @radical. * Update src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs Co-authored-by: NAnkit Jain <radical@gmail.com> * Addressing @radical comments. * Addressing @radical comments. Co-authored-by: NAnkit Jain <radical@gmail.com>
-