Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can not see top level mutable variabel with debugger #4149

Closed
callmekohei opened this issue Dec 21, 2017 · 10 comments
Closed

I can not see top level mutable variabel with debugger #4149

callmekohei opened this issue Dec 21, 2017 · 10 comments
Labels
Area-Debug stepping, debug points, stacks and more Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone

Comments

@callmekohei
Copy link

Repro steps

  1. Step A

create mdb file

sample9$ ls
foo.fsx
sample9$ cat foo.fsx 
let x = "apple"
let y = "banana"
let mutable z = "cherry"
z <- "grape"

let foo () =
    let mutable a = 100
    let b = 200
    a <- 300
    (a,b)

foo()
sample9$ fsharpc -g --optimize- foo.fsx
F# Compiler for F# 4.1
Freely distributed under the Apache 2.0 Open Source License
sample9$ ls
foo.exe     foo.exe.mdb foo.fsx
  1. Step B

debug foo.exe with sdb

sample9$ sdb 'run foo.exe'
Welcome to the Mono soft debugger (sdb 1.5.6548.37600)
Type 'help' for a list of commands or 'quit' to exit

Inferior process '2687' ('foo.exe') started
Inferior process '2687' ('foo.exe') exited with code '0'
(sdb) watch add z
Added watch '0' with expression 'z'
(sdb) bp add at foo.fsx 3
Breakpoint '0' added at '/Users/callmekohei/tmp/sample9/foo.fsx:3'
(sdb) r
Inferior process '2709' ('foo.exe') started
Hit breakpoint at '/Users/callmekohei/tmp/sample9/foo.fsx:3'
#0 [0x0000000D] <StartupCode$foo>.$Foo$fsx.main@ at /Users/callmekohei/tmp/sample9/foo.fsx:3
let mutable z = "cherry"
(sdb) watch
#0 'z': <namespace> it = z
#0 'z': <namespace> it = z
(sdb) s
Inferior process '2709' ('foo.exe') resumed
Inferior process '2709' ('foo.exe') suspended
#0 [0x00000017] <StartupCode$foo>.$Foo$fsx.main@ at /Users/callmekohei/tmp/sample9/foo.fsx:4
z <- "grape"
(sdb) watch
#0 'z': <namespace> it = z
#0 'z': <namespace> it = z
(sdb) s
Inferior process '2709' ('foo.exe') resumed
Inferior process '2709' ('foo.exe') suspended
#0 [0x00000021] <StartupCode$foo>.$Foo$fsx.main@ at /Users/callmekohei/tmp/sample9/foo.fsx:12
foo()
(sdb) watch
#0 'z': <namespace> it = z
#0 'z': <namespace> it = z
(sdb) kill
Inferior process '2709' ('foo.exe') exited with code '0'
(sdb) q
Bye
sample9$ 

like this

untitled

Expected behavior

watch z

#0 'z': string it = "cherry"

step into

watch z

#0 'z': string it = "grape"

Actual behavior

watch z

#0 'z': <namespace> it = z

step into

watch z

#0 'z': <namespace> it = z

Known workarounds

I do not know...

Related information

  • Operating system
tmp$ sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.13.1
BuildVersion:	17B1003

tmp$ uname -a
Darwin callmekoheis-MacBook-Air.local
17.2.0 Darwin Kernel Version 17.2.0: Fri Sep 29 18:27:05 PDT 2017;
root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64
  • .NET Runtime, CoreCLR or Mono Version
tmp$ mono --version
Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Sun Sep 17 18:29:46 BST 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen (concurrent by default)
  • Editing Tools (e.g. Visual Studio Version)
tmp$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 18 2017 09:51:58)
macOS version
Included patches: 1-1350
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl               +farsi             +mouse_sgr         -tag_any_white
+arabic            +file_in_path      -mouse_sysmouse    -tcl
+autocmd           +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    -gettext           +netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          -toolbar
+cindent           +insert_expand     +path_extra        +user_commands
-clientserver      +job               +perl              +vertsplit
+clipboard         +jumplist          +persistent_undo   +virtualedit
+cmdline_compl     +keymap            +postscript        +visual
+cmdline_hist      +lambda            +printer           +visualextra
+cmdline_info      +langmap           +profile           +viminfo
+comments          +libcall           -python            +vreplace
+conceal           +linebreak         +python3           +wildignore
+cryptv            +lispindent        +quickfix          +wildmenu
+cscope            +listcmds          +reltime           +windows
+cursorbind        +localmap          +rightleft         +writebackup
+cursorshape       -lua               +ruby              -X11
+dialog_con        +menu              +scrollbind        -xfontset
+diff              +mksession         +signs             -xim
+digraphs          +modify_fname      +smartindent       -xpm
-dnd               +mouse             +startuptime       -xsmp
-ebcdic            -mouseshape        +statusline        -xterm_clipboard
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_save
+eval              -mouse_gpm         +syntax            
+ex_extra          -mouse_jsbterm     +tag_binary        
+extra_search      +mouse_netterm     +tag_old_static    
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X -DMACOS_X_DARWIN  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: clang   -L.             -L /BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib -L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib  -L/usr/local/lib -o vim        -lm  -lncurses -liconv -framework AppKit   -fstack-protector  -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl  -L/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin -lpython3.6m -framework CoreFoundation  -lruby.2.3.0 -lobjc   
@xuanduc987
Copy link
Contributor

On VS 2017
vs

@vasily-kirichenko
Copy link
Contributor

Try to inspect children of the (magic) "this" node in "Locals" VS debug view.

@xuanduc987
Copy link
Contributor

@vasily-kirichenko
There are no local variable in startup code?
image

@vasily-kirichenko
Copy link
Contributor

:( No "autos" either?

@xuanduc987
Copy link
Contributor

image
Nothing :(

@xuanduc987
Copy link
Contributor

Workaround?
image

@callmekohei
Copy link
Author

Oh... @xuanduc987 Great! (^_^)/

I see.

Top level mutable variable needs namespace to look into a value.

Thanks!

I close issue.

screen shot 2017-12-21 at 17 29 49

screen shot 2017-12-21 at 17 30 06

screen shot 2017-12-21 at 17 30 26

@callmekohei
Copy link
Author

Oh...

re-open

@callmekohei callmekohei reopened this Dec 21, 2017
@dsyme
Copy link
Contributor

dsyme commented Jan 9, 2018

I think this is bug #1003

@KevinRansom It would be really great if we could get the open namespaces propagated to the Portable PDB file

@dsyme dsyme added Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Area-Debug stepping, debug points, stacks and more labels Jan 9, 2018
@cartermp cartermp added this to the 16.0 milestone Aug 29, 2018
@cartermp cartermp modified the milestones: 16.0, 16.1 Feb 21, 2019
@cartermp cartermp modified the milestones: 16.1, 16.2 Apr 23, 2019
@cartermp cartermp modified the milestones: 16.2, Backlog Apr 30, 2019
@dsyme
Copy link
Contributor

dsyme commented Aug 16, 2021

Duplicate of #1003

@dsyme dsyme marked this as a duplicate of #1003 Aug 16, 2021
@dsyme dsyme closed this as completed Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Debug stepping, debug points, stacks and more Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Projects
None yet
Development

No branches or pull requests

5 participants