Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic VS2017 intellisense / autocomplete not working (Read 1446 times)
computski
Newbies
*
Offline


Posts: 2
Joined: Aug 31st, 2019
VS2017 intellisense / autocomplete not working
Aug 31st, 2019 at 11:32am
Print Post  
I have VS2017.  installed vMicro. I can compile a basic sketch and the serial port works. 

But code editor intellisense and autosuggest not working.
e.g. type Serial. and it suggests nothing
type serial.prinxxx and it does not highlight this as wrong
type Serial.begin(9600);  and it does not colour the correct words.

when typing basic c++ such as "if"  or "switch" they are coloured correctly.

Am I missing a setting?   Compiler dump below.


Code (C++)
Select All
Compiling debug version of 'Sketch2' for 'ATmega328 (Arduino Nano)'
Build Folder: ase"
Additional Defines: VM_DEBUGGER_TYPE_HARDWARESERIAL 0;VM_DEBUGGER_TYPE_SOFTWARESERIAL 1;VM_DEBUGGER_TYPE_FASTSERIAL 2;VM_DEBUGGER_TYPE_USB 3;VM_DEBUGGER_TYPE_TEENSY 4;VM_DEBUGGER_TYPE_UART 5;VM_DEBUGGER_TYPE_USART 6;VM_DEBUGGER_TYPE_USBSERIAL 7;VM_DEBUGGER_TYPE_TTYUART 8;VM_DEBUGGER_TYPE_NET_CONSOLE 9;VM_DEBUGGER_TYPE_Uart 10;VM_DEBUGGER_TYPE_COSA 11;VM_DEBUGGER_TYPE_CDCSerialClass 12;VM_DEBUGGER_TYPE_HARDWARESERIAL1 13;VM_DEBUGGER_TYPE_HARDWARESERIAL2 14;VM_DEBUGGER_TYPE_HARDWARESERIAL3 15;VM_DEBUGGER_TYPE_NET_UDP 16;VM_DEBUGGER_TYPE_USBAPI 17;VM_DEBUGGER_TYPE_SERIALUSB 18;VM_DEBUGGER_TYPE_MS430_SERIAL_ 19;VM_DEBUGGER_TYPE_NO_SERIAL 20;VM_DEBUGGER_TYPE_GENERIC_OBJECT 21;VM_DEBUG_ENABLE 1;VM_DEBUG;VM_DEBUG_BANDWIDTH_THROTTLE_MS 100;VM_DEBUGGER_SOFT_TRANSPORT Serial;VM_DEBUGGER_SOFT_TRANSPORT_WRITER Serial;VM_DEBUGGER_TYPE VM_DEBUGGER_TYPE_GENERIC_OBJECT;VM_DEBUG_BREAKPAUSE;
Architecture Tools: "file:///C:/Program%20Files%20(x86)/Arduino/hardware/tools/avr/bin/"
Api: 1908070
Sketch Book: "file:///C:/Users/Julian/Documents/Arduino"
Sketch Include Paths
Core Include Paths
Include Path "file:///C:/Program%20Files%20(x86)/Arduino/hardware/arduino/avr/cores/arduino"
Include Path naloginputs"

Deep search for libraries ...
Using previous search results: h2.cpp
Using previous search results: h2.cpp
"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DVM_DEBUG_BREAKPAUSE -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_GENERIC_OBJECT -DVM_DEBUGGER_SOFT_TRANSPORT_WRITER=Serial -DVM_DEBUGGER_SOFT_TRANSPORT=Serial -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=100 -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUGGER_TYPE_GENERIC_OBJECT=21 -DVM_DEBUGGER_TYPE_NO_SERIAL=20 -DVM_DEBUGGER_TYPE_MS430_SERIAL_=19 -DVM_DEBUGGER_TYPE_SERIALUSB=18 -DVM_DEBUGGER_TYPE_USBAPI=17 -DVM_DEBUGGER_TYPE_NET_UDP=16 -DVM_DEBUGGER_TYPE_HARDWARESERIAL3=15 -DVM_DEBUGGER_TYPE_HARDWARESERIAL2=14 -DVM_DEBUGGER_TYPE_HARDWARESERIAL1=13 -DVM_DEBUGGER_TYPE_CDCSerialClass=12 -DVM_DEBUGGER_TYPE_COSA=11 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0   -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" -I"c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\ed2mmpmr.3jk\Micro Platforms\default\debuggers\VM_DBG" -I"c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\ed2mmpmr.3jk\Micro Platforms\default\debuggers\VM_DBG\utility" "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\ed2mmpmr.3jk\Micro Platforms\default\debuggers\VM_DBG\VM_DBG.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DVM_DEBUG_BREAKPAUSE -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_GENERIC_OBJECT -DVM_DEBUGGER_SOFT_TRANSPORT_WRITER=Serial -DVM_DEBUGGER_SOFT_TRANSPORT=Serial -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=100 -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUGGER_TYPE_GENERIC_OBJECT=21 -DVM_DEBUGGER_TYPE_NO_SERIAL=20 -DVM_DEBUGGER_TYPE_MS430_SERIAL_=19 -DVM_DEBUGGER_TYPE_SERIALUSB=18 -DVM_DEBUGGER_TYPE_USBAPI=17 -DVM_DEBUGGER_TYPE_NET_UDP=16 -DVM_DEBUGGER_TYPE_HARDWARESERIAL3=15 -DVM_DEBUGGER_TYPE_HARDWARESERIAL2=14 -DVM_DEBUGGER_TYPE_HARDWARESERIAL1=13 -DVM_DEBUGGER_TYPE_CDCSerialClass=12 -DVM_DEBUGGER_TYPE_COSA=11 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0   -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" -I"c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\ed2mmpmr.3jk\Micro Platforms\default\debuggers\VM_DBG" -I"c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\ed2mmpmr.3jk\Micro Platforms\default\debuggers\VM_DBG\utility" "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\ed2mmpmr.3jk\Micro Platforms\default\debuggers\VM_DBG\VM_mem_check.c" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DVM_DEBUG_BREAKPAUSE -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_GENERIC_OBJECT -DVM_DEBUGGER_SOFT_TRANSPORT_WRITER=Serial -DVM_DEBUGGER_SOFT_TRANSPORT=Serial -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=100 -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUGGER_TYPE_GENERIC_OBJECT=21 -DVM_DEBUGGER_TYPE_NO_SERIAL=20 -DVM_DEBUGGER_TYPE_MS430_SERIAL_=19 -DVM_DEBUGGER_TYPE_SERIALUSB=18 -DVM_DEBUGGER_TYPE_USBAPI=17 -DVM_DEBUGGER_TYPE_NET_UDP=16 -DVM_DEBUGGER_TYPE_HARDWARESERIAL3=15 -DVM_DEBUGGER_TYPE_HARDWARESERIAL2=14 -DVM_DEBUGGER_TYPE_HARDWARESERIAL1=13 -DVM_DEBUGGER_TYPE_CDCSerialClass=12 -DVM_DEBUGGER_TYPE_COSA=11 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0   -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" -I"c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\ed2mmpmr.3jk\Micro Platforms\default\debuggers\VM_DBG" -I"c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\ed2mmpmr.3jk\Micro Platforms\default\debuggers\VM_DBG\utility" "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\ed2mmpmr.3jk\Micro Platforms\default\debuggers\VM_DBG\VM_mem_check_sam.cpp" -o "nul"

Building variant ...

  Using previously compiled variant

Building core ...

Building libraries ...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DVM_DEBUG_BREAKPAUSE -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_GENERIC_OBJECT -DVM_DEBUGGER_SOFT_TRANSPORT_WRITER=Serial -DVM_DEBUGGER_SOFT_TRANSPORT=Serial -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=100 -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUGGER_TYPE_GENERIC_OBJECT=21 -DVM_DEBUGGER_TYPE_NO_SERIAL=20 -DVM_DEBUGGER_TYPE_MS430_SERIAL_=19 -DVM_DEBUGGER_TYPE_SERIALUSB=18 -DVM_DEBUGGER_TYPE_USBAPI=17 -DVM_DEBUGGER_TYPE_NET_UDP=16 -DVM_DEBUGGER_TYPE_HARDWARESERIAL3=15 -DVM_DEBUGGER_TYPE_HARDWARESERIAL2=14 -DVM_DEBUGGER_TYPE_HARDWARESERIAL1=13 -DVM_DEBUGGER_TYPE_CDCSerialClass=12 -DVM_DEBUGGER_TYPE_COSA=11 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0 -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" -I"c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\ed2mmpmr.3jk\Micro Platforms\default\debuggers\VM_DBG" "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\ed2mmpmr.3jk\Micro Platforms\default\debuggers\VM_DBG\VM_DBG.cpp" -o BG\VM_DBG.cpp.o"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DVM_DEBUG_BREAKPAUSE -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_GENERIC_OBJECT -DVM_DEBUGGER_SOFT_TRANSPORT_WRITER=Serial -DVM_DEBUGGER_SOFT_TRANSPORT=Serial -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=100 -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUGGER_TYPE_GENERIC_OBJECT=21 -DVM_DEBUGGER_TYPE_NO_SERIAL=20 -DVM_DEBUGGER_TYPE_MS430_SERIAL_=19 -DVM_DEBUGGER_TYPE_SERIALUSB=18 -DVM_DEBUGGER_TYPE_USBAPI=17 -DVM_DEBUGGER_TYPE_NET_UDP=16 -DVM_DEBUGGER_TYPE_HARDWARESERIAL3=15 -DVM_DEBUGGER_TYPE_HARDWARESERIAL2=14 -DVM_DEBUGGER_TYPE_HARDWARESERIAL1=13 -DVM_DEBUGGER_TYPE_CDCSerialClass=12 -DVM_DEBUGGER_TYPE_COSA=11 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0 -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" -I"c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\ed2mmpmr.3jk\Micro Platforms\default\debuggers\VM_DBG" "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\ed2mmpmr.3jk\Micro Platforms\default\debuggers\VM_DBG\VM_mem_check_sam.cpp" -o BG\VM_mem_check_sam.cpp.o"

Building project code ...
  Using previously compiled file: h2.cpp.o

Linking it all together ...
# Coping cached core cd352d\core.a to a

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o ch2.ino.elf" "Sketch2.cpp.o" "VM_DBG\VM_DBG.cpp.o" "VM_DBG\VM_mem_check_sam.cpp.o" .a" "-LC:\Users\Julian\AppData\Local\Temp\VMBuilds\Sketch2\nano_atmega328\Release" -lm
## recipe.objcopy.eep.pattern
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 ch2.ino.elf" ch2.ino.eep"
## recipe.objcopy.hex.pattern
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -R .eeprom ch2.ino.elf" ch2.ino.hex"

Program Sketch2 size: 2,550 bytes (used 8% of a 30,720 byte maximum) (2.49 secs)
Minimum Memory Usage: 300 bytes (15% of a 2048 byte maximum)

# Copy build result to 'Project>Property Pages>Intermediate Directory'
# Destination: file:///C:/Users/Julian/Documents/Arduino/Sketch2/Release/



 

« Last Edit: Aug 31st, 2019 at 2:39pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS2017 intellisense / autocomplete not working
Reply #1 - Aug 31st, 2019 at 2:44pm
Print Post  
Hi

1)
Please follow the guide in the yellow box above so we can see your config.

2)
Does the issue happen with a new empty project?

3)
If the issue does not happen in a new project then close the failing project and delete the .vs folder from below it or if different, from the folder where the solution (sln) is.


Does this help?
  
Back to top
WWW  
IP Logged
 
computski
Newbies
*
Offline


Posts: 2
Joined: Aug 31st, 2019
Re: VS2017 intellisense / autocomplete not working
Reply #2 - Aug 31st, 2019 at 11:48pm
Print Post  
Hi,
thanks for the swift response.
per your 1/ what yellow box?  I did a verbose compile...
per 2/ new projects work ok
per 3/ noted

I updated VS2017 in VSinstaller as it was prompting me to. 

Reopened the app, created a new project and now the suggest/autocomplete is working.  Also works for existing projects.   It does not color the text though (which would be nice).  e.g. Serial.begin(9600);  is shown as black text.  Same with libraries.   From screenshots in the docs, I though these keywords were supposed to be colored?

I also noticed I can only properly open projects I create or existing ones through the Vmicro menu (.vcxprog or .ino), not through the regular 'recent projects' splash page in VS2017.  The projects either don't show on that page or won't load properly.  An observation, not a complaint.

thanks again.
J
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS2017 intellisense / autocomplete not working
Reply #3 - Sep 2nd, 2019 at 10:41am
Print Post  
If you use File>New>Project>C++>Arduin Sketch then it will be added to the recent solutions and projects list.

If you use "File>Open>Arduino Project>click the .sln" that will add to the vs recent solutions and projects list

If you use File>Open>project to open an existing vs project that will add to the recent list.

In the solution explorer, if you click on an open solution and click "File>Save As" keeping the same name that will add to the recent list

If you use any standard vs feature to open a project that will add to the recent list

If you fail to click save when closing a new created solution/project then it's possible that the solution will not know about the project, thus you would get an error trying to open.

We actually just use standard vs c++ projects and solutions for Arduino with no special "opening" workflows.

When you use File>Open>Arduino Project it will not add top the recent lists unless you click to open an existing .sln

  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint