|
21 | 21 | import java.util.Set; |
22 | 22 | import java.util.concurrent.CompletableFuture; |
23 | 23 | import java.util.concurrent.ExecutionException; |
| 24 | +import java.util.logging.Level; |
| 25 | +import java.util.logging.Logger; |
24 | 26 | import java.util.stream.Collectors; |
25 | 27 |
|
26 | 28 | import org.apache.commons.lang3.StringUtils; |
27 | 29 |
|
| 30 | +import com.microsoft.java.debug.core.Configuration; |
28 | 31 | import com.microsoft.java.debug.core.DebugSettings; |
29 | 32 | import com.microsoft.java.debug.core.adapter.AdapterUtils; |
30 | 33 | import com.microsoft.java.debug.core.adapter.ErrorCode; |
|
57 | 60 | import com.sun.jdi.Value; |
58 | 61 |
|
59 | 62 | public class VariablesRequestHandler implements IDebugRequestHandler { |
| 63 | + protected static final Logger logger = Logger.getLogger(Configuration.LOGGER_NAME); |
60 | 64 |
|
61 | 65 | @Override |
62 | 66 | public List<Command> getTargetCommands() { |
@@ -141,7 +145,10 @@ public CompletableFuture<Response> handle(Command command, Arguments arguments, |
141 | 145 | } |
142 | 146 | } |
143 | 147 | } catch (InterruptedException | ExecutionException e) { |
144 | | - // do nothing. |
| 148 | + logger.log(Level.WARNING, |
| 149 | + String.format("Failed to get the logical structure for the type %s, fall back to the Object view.", |
| 150 | + containerObj.type().name()), |
| 151 | + e); |
145 | 152 | } |
146 | 153 | } |
147 | 154 | } |
@@ -217,7 +224,8 @@ public CompletableFuture<Response> handle(Command command, Arguments arguments, |
217 | 224 | indexedVariables = ((IntegerValue) size).value(); |
218 | 225 | } |
219 | 226 | } catch (InterruptedException | ExecutionException e) { |
220 | | - // do nothing. |
| 227 | + logger.log(Level.INFO, |
| 228 | + String.format("Failed to get the logical size for the type %s.", value.type().name()), e); |
221 | 229 | } |
222 | 230 | } |
223 | 231 | } |
|
0 commit comments