Skip to content

flutter test expects breakpoint uris as Windows paths on Windows #15513

Closed

Description

@DanTup

(Moved from dart-lang/sdk#32500 based on this comment).

I'm often investigating bugs relating to missed breakpoints on Windows in Dart Code and they're often caused by the format of paths being passed to the VM. Up until today, the format that seemed to work reliably for Dart and Flutter on Windows was this:

"/M:/Coding/Applications/Dart-Code/test/test_projects/hello_world/bin/main.dart"

However today when running flutter test I noticed them being missed again. Seems that flutter test wants them in this form:

"uri":"M:\\Coding\\Applications\\Dart-Code\\test\\test_projects\\flutter_hello_world\\test\\hello_test.dart"

I could add this additional format, however since it's not a uri I'm concerned it might start being rejected at some point. It seems like the format used for breakpoints in flutter run and flutter test should match?

Activity

  1. added
    platform-windows
    on Mar 14, 2018
  2. DanTup commented on Apr 4, 2018

    @DanTup
    ContributorAuthor

    This came up again today, @escamoteur is hitting it.

  3. DanTup commented on Apr 17, 2018

    @DanTup
    ContributorAuthor

    This appears to be fixed - sending the breakpoint only in the original form now pauses the debugger on Windows.

    {
    	"id": "646",
    	"method": "addBreakpointWithScriptUri",
    	"params": {
    		"isolateId": "isolates/1039408063",
    		"scriptUri": "/M:/Coding/Applications/Google/flutter/examples/flutter_gallery/test/demo/material/drawer_demo_test.dart",
    		"line": 16
    	}
    }
    {
    	"jsonrpc": "2.0",
    	"method": "streamNotify",
    	"params": {
    		"streamId": "Debug",
    		"event": {
    			"type": "Event",
    			"kind": "PauseBreakpoint",
    			"isolate": {
    				"type": "@Isolate",
    				"fixedId": true,
    				"id": "isolates\/1039408063",
    				"name": "listener.dart.dill:main()",
    				"number": "1039408063"
    			},
    			"timestamp": 1523966477918,
    			"pauseBreakpoints": [
    				{
    					"type": "Breakpoint",
    					"fixedId": true,
    					"id": "breakpoints\/1",
    					"breakpointNumber": 1,
    					"resolved": true,
    					"location": {
    						"type": "SourceLocation",
    						"script": {
    							"type": "@Script",
    							"fixedId": true,
    							"id": "libraries\/@20028264\/scripts\/file%3A%2F%2F%2FM%3A%2FCoding%2FApplications%2FGoogle%2Fflutter%2Fexamples%2Fflutter_gallery%2Ftest%2Fdemo%2Fmaterial%2Fdrawer_demo_test.dart\/162d37afdc0",
    							"uri": "file:\/\/\/M:\/Coding\/Applications\/Google\/flutter\/examples\/flutter_gallery\/test\/demo\/material\/drawer_demo_test.dart",
    							"_kind": "kernel"
    						},
    						"tokenPos": 595
    					}
    				}
    			],
  4. github-actions commented on Sep 3, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform-windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions