สำหรับใครที่ใช้ VScode
และ Extensions Arduino
แล้วติดปัญหาเวลา verify
แล้วมีข้อความ DEBUG
ยาวๆ ขึ้นมา นี้คือวิธีแก้ไขครับ อันดับแรกเช็คก่อนครับว่า ใช้ Arduino ide Version อะไร ที่ผมมีปัญหาคือผมใช้เวอร์ชั่นล่าสุดเลย 1.8.10
พอเอามา verify โค้ตธรรมดาก็มีข้อความยาวๆ ขึ้นมากวนใจ ซึ่งมันอ่านลำบากมากแบบนี้
DEBUG StatusLogger Checking to see if class cc.arduino.view.preferences.Preferences matches criteria annotated with @Plugin
DEBUG StatusLogger Took 0.123580 seconds to load 0 plugins from package cc.arduino
DEBUG StatusLogger PluginManager 'Core' found 118 plugins
DEBUG StatusLogger PluginManager 'Level' found 0 plugins
DEBUG StatusLogger PluginManager 'Lookup' found 13 plugins
DEBUG StatusLogger Building Plugin[name=layout, class=org.apache.logging.log4j.core.layout.PatternLayout].
TRACE StatusLogger TypeConverterRegistry initializing.
DEBUG StatusLogger PluginManager 'TypeConverter' found 26 plugins
DEBUG StatusLogger PatternLayout$Builder(pattern="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}{UTC} %p %c{1.}:%L [%t] %m%n", PatternSelector=null, Configuration(Arduino), Replace=null, charset="null", alwaysWriteExceptions="null", disableAnsi="null", noConsoleNoAnsi="null", header="null", footer="null")
DEBUG StatusLogger PluginManager 'Converter' found 44 plugins
DEBUG StatusLogger Building Plugin[name=appender, class=org.apache.logging.log4j.core.appender.ConsoleAppender].
DEBUG StatusLogger ConsoleAppender$Builder(target="SYSTEM_ERR", follow="null", direct="null", bufferedIo="null", bufferSize="null", immediateFlush="null", ignoreExceptions="null", PatternLayout(%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}{UTC} %p %c{1.}:%L [%t] %m%n), name="Console", Configuration(Arduino), Filter=null, ={})
DEBUG StatusLogger Starting OutputStreamManager SYSTEM_ERR.false.false
DEBUG StatusLogger Building Plugin[name=layout, class=org.apache.logging.log4j.core.layout.PatternLayout].
DEBUG StatusLogger PatternLayout$Builder(pattern="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}{UTC} %p %c{1.}:%L [%t] %m%n", PatternSelector=null, Configuration(Arduino), Replace=null, charset="null", alwaysWriteExceptions="null", disableAnsi="null", noConsoleNoAnsi="null", header="null", footer="null")
DEBUG StatusLogger Building Plugin[name=SizeBasedTriggeringPolicy, class=org.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy].
DEBUG StatusLogger createPolicy(size="50 MB")
DEBUG StatusLogger Building Plugin[name=Policies, class=org.apache.logging.log4j.core.appender.rolling.CompositeTriggeringPolicy].
DEBUG StatusLogger createPolicy(={SizeBasedTriggeringPolicy(size=52428800)})
DEBUG StatusLogger Building Plugin[name=DefaultRolloverStrategy, class=org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy].
DEBUG StatusLogger DefaultRolloverStrategy$Builder(max="20", min="null", fileIndex="null", compressionLevel="null", ={}, stopCustomActionsOnError="null", tempCompressedFilePattern="null", Configuration(Arduino))
DEBUG StatusLogger Building Plugin[name=appender, class=org.apache.logging.log4j.core.appender.RollingFileAppender].
DEBUG StatusLogger RollingFileAppender$Builder(fileName="C:\Users\ArcHeR\AppData\Local\Arduino15/logs/application.log", filePattern="C:\Users\ArcHeR\AppData\Local\Arduino15/logs/application-%d{MM-dd-yyyy}-%i.log.gz", append="null", locking="null", Policies(CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=52428800)])), DefaultRolloverStrategy(DefaultRolloverStrategy(min=1, max=20, useMax=true)), advertise="null", advertiseUri="null", createOnDemand="null", filePermissions="null", fileOwner="null", fileGroup="null", bufferedIo="null", bufferSize="null", immediateFlush="null", ignoreExceptions="false", PatternLayout(%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}{UTC} %p %c{1.}:%L [%t] %m%n), name="RollingFile", Configuration(Arduino), Filter=null, ={})
TRACE StatusLogger New file 'C:\Users\ArcHeR\AppData\Local\Arduino15/logs/application.log' created = false
DEBUG StatusLogger Returning file creation time for C:\Users\ArcHeR\AppData\Local\Arduino15\logs\application.log
DEBUG StatusLogger Starting RollingFileManager C:\Users\ArcHeR\AppData\Local\Arduino15/logs/application.log
DEBUG StatusLogger PluginManager 'FileConverter' found 2 plugins
DEBUG StatusLogger Setting prev file time to 2019-09-21T10:51:32.459+0700
DEBUG StatusLogger Initializing triggering policy CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=52428800)])
DEBUG StatusLogger Initializing triggering policy SizeBasedTriggeringPolicy(size=52428800)
DEBUG StatusLogger Building Plugin[name=appenders, class=org.apache.logging.log4j.core.config.AppendersPlugin].
DEBUG StatusLogger createAppenders(={Console, RollingFile})
DEBUG StatusLogger Building Plugin[name=AppenderRef, class=org.apache.logging.log4j.core.config.AppenderRef].
DEBUG StatusLogger createAppenderRef(ref="Console", level="INFO", Filter=null)
DEBUG StatusLogger Building Plugin[name=AppenderRef, class=org.apache.logging.log4j.core.config.AppenderRef].
DEBUG StatusLogger createAppenderRef(ref="RollingFile", level="null", Filter=null)
DEBUG StatusLogger Building Plugin[name=root, class=org.apache.logging.log4j.core.config.LoggerConfig$RootLogger].
DEBUG StatusLogger createLogger(additivity="null", level="DEBUG", includeLocation="null", ={Console, RollingFile}, ={}, Configuration(Arduino), Filter=null)
DEBUG StatusLogger Building Plugin[name=loggers, class=org.apache.logging.log4j.core.config.LoggersPlugin].
DEBUG StatusLogger createLoggers(={root})
DEBUG StatusLogger Configuration XmlConfiguration[location=jar:file:/C:/Program%20Files%20(x86)/Arduino/lib/pde.jar!/log4j2.xml] initialized
DEBUG StatusLogger Starting configuration XmlConfiguration[location=jar:file:/C:/Program%20Files%20(x86)/Arduino/lib/pde.jar!/log4j2.xml]
DEBUG StatusLogger Started configuration XmlConfiguration[location=jar:file:/C:/Program%20Files%20(x86)/Arduino/lib/pde.jar!/log4j2.xml] OK.
TRACE StatusLogger Stopping org.apache.logging.log4j.core.config.DefaultConfiguration@1b3536e...
TRACE StatusLogger DefaultConfiguration notified 1 ReliabilityStrategies that config will be stopped.
TRACE StatusLogger DefaultConfiguration stopping root LoggerConfig.
TRACE StatusLogger DefaultConfiguration notifying ReliabilityStrategies that appenders will be stopped.
TRACE StatusLogger DefaultConfiguration stopping remaining Appenders.
DEBUG StatusLogger Shutting down OutputStreamManager SYSTEM_OUT.false.false-1
DEBUG StatusLogger Shut down OutputStreamManager SYSTEM_OUT.false.false-1, all resources released: true
DEBUG StatusLogger Appender DefaultConsole-1 stopped with status true
TRACE StatusLogger DefaultConfiguration stopped 1 remaining Appenders.
TRACE StatusLogger DefaultConfiguration cleaning Appenders from 1 LoggerConfigs.
DEBUG StatusLogger Stopped org.apache.logging.log4j.core.config.DefaultConfiguration@1b3536e OK
TRACE StatusLogger Reregistering MBeans after reconfigure. Selector=org.apache.logging.log4j.core.selector.ClassLoaderContextSelector@1e10dc6
TRACE StatusLogger Reregistering context (1/1): 'af3868' org.apache.logging.log4j.core.LoggerContext@9b0314
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=StatusLogger'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=ContextSelector'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=Loggers,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=Appenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=AsyncAppenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=AsyncLoggerRingBuffer'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=Loggers,name=*,subtype=RingBuffer'
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=af3868
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=af3868,component=StatusLogger
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=af3868,component=ContextSelector
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=af3868,component=Loggers,name=
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=af3868,component=Appenders,name=Console
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=af3868,component=Appenders,name=RollingFile
TRACE StatusLogger Using default SystemClock for timestamps.
DEBUG StatusLogger org.apache.logging.log4j.core.util.SystemClock does not support precise timestamps.
TRACE StatusLogger Using DummyNanoClock for nanosecond timestamps.
DEBUG StatusLogger Reconfiguration complete for context[name=af3868] at URI jar:file:/C:/Program%20Files%20(x86)/Arduino/lib/pde.jar!/log4j2.xml (org.apache.logging.log4j.core.LoggerContext@9b0314) with optional ClassLoader: null
DEBUG StatusLogger Shutdown hook enabled. Registering a new one.
DEBUG StatusLogger LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@9b0314] started OK.
Preparing boards...
Verifying...
Sketch uses 214436 bytes (16%) of program storage space. Maximum is 1310720 bytes.
Global variables use 15336 bytes (4%) of dynamic memory, leaving 312344 bytes for local variables. Maximum is 327680 bytes.
DEBUG StatusLogger Stopping LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@9b0314]
DEBUG StatusLogger Stopping LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@9b0314]...
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=StatusLogger]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=ContextSelector]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=Loggers,name=]
TRACE StatusLogger Unregistering 2 MBeans: [org.apache.logging.log4j2:type=af3868,component=Appenders,name=RollingFile, org.apache.logging.log4j2:type=af3868,component=Appenders,name=Console]
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=AsyncAppenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=AsyncLoggerRingBuffer'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=Loggers,name=*,subtype=RingBuffer'
TRACE StatusLogger Stopping XmlConfiguration[location=jar:file:/C:/Program%20Files%20(x86)/Arduino/lib/pde.jar!/log4j2.xml]...
TRACE StatusLogger XmlConfiguration notified 2 ReliabilityStrategies that config will be stopped.
TRACE StatusLogger XmlConfiguration stopping 1 LoggerConfigs.
TRACE StatusLogger XmlConfiguration stopping root LoggerConfig.
TRACE StatusLogger XmlConfiguration notifying ReliabilityStrategies that appenders will be stopped.
TRACE StatusLogger XmlConfiguration stopping remaining Appenders.
DEBUG StatusLogger Shutting down RollingFileManager C:\Users\ArcHeR\AppData\Local\Arduino15/logs/application.log
DEBUG StatusLogger Shutting down RollingFileManager C:\Users\ArcHeR\AppData\Local\Arduino15/logs/application.log
DEBUG StatusLogger All asynchronous threads have terminated
DEBUG StatusLogger RollingFileManager shutdown completed with status true
DEBUG StatusLogger Shut down RollingFileManager C:\Users\ArcHeR\AppData\Local\Arduino15/logs/application.log, all resources released: true
DEBUG StatusLogger Appender RollingFile stopped with status true
DEBUG StatusLogger Shutting down OutputStreamManager SYSTEM_ERR.false.false
DEBUG StatusLogger Shut down OutputStreamManager SYSTEM_ERR.false.false, all resources released: true
DEBUG StatusLogger Appender Console stopped with status true
TRACE StatusLogger XmlConfiguration stopped 2 remaining Appenders.
TRACE StatusLogger XmlConfiguration cleaning Appenders from 2 LoggerConfigs.
DEBUG StatusLogger Stopped XmlConfiguration[location=jar:file:/C:/Program%20Files%20(x86)/Arduino/lib/pde.jar!/log4j2.xml] OK
DEBUG StatusLogger Stopped LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@9b0314] with status true
ทีนี้เรามาย้อนกลับไปดูที่ Extensions Arduino มันบอกไว้แบบนี้
ความหมายก็คือ ตอนนี้ยังไม่ซัพพอต เวอร์อื่นนอกจาก 1.8.6 และ 1.8.8 ครับ คือจะลงเวอร์ชั่นอื่นก็ได้แต่อาจมีปัญหาอย่างที่กล่าวมาข้างต้น อ่ะทีนี้เรามาแก้ไขตามที่เขาบอกกันดูว่าจะหายจริงไหม
โดยการไปโหลด Arduino ide V.1.8.8 มาลงแทน 1.8.10 ครับ
ทีนี้ลอง verify
ด้วยโค้ตชุดเดิม
ผลที่ได้คือข้อความ DEBUG ไม่ขึ้นมากวนใจแล้วครับ
ข้อควรระวัง หากเพลอไปกดเปิด code ด้วย arduino ide มันจะขึ้นมาให้อัพเดทก็อย่าพึ่งไปกดอัพเดทนะครับ เดียวจะมีปัญหาแบบเดิมอีก ให้กดกาทิ้งไปก่อนครับ