Questions tagged [inspect]

DO NOT USE! THIS IS AMBIGUOUS. You might be looking for [web-inspector].

610 questions
3
votes
6 answers

Truncate #inspect output in irb (ruby)

I want to truncate #inspect output in irb (a large output must be cropped to MAX_LEN). Currently, I override :inspect, :to_s methods for all specific objects. Is there are other solution? change $stdout ? other?
Pavel Ajtkulov
  • 515
  • 7
  • 21
3
votes
3 answers

Tool to view a web page's div structure

Is there a tool out there that can show you an entire page's div layout structure? I'm using Chrome's inspect tool and it shows individual divs as you scroll through, but I'm hoping there's a tool out there that will look at the entire page's…
Phil
  • 320
  • 4
  • 16
3
votes
1 answer

In Ruby, can I limit the amount of drilling down a object does when displaying itself in irb or when using .inspect?

I'm writing a class for solving sudoku puzzles that has some two dimensional arrays which contain pointers to Cells that point back to these two dimensional arrays. Something like this: def class Sudoku attr :rows, :columns, :blocks def…
aarona
  • 35,986
  • 41
  • 138
  • 186
3
votes
1 answer

I get an error "Request Log.enable failed" when run "node --inspect"

I am trying to run node.js application with the new node 6.3+ --inspect feature (https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27) But everytime I get the next error: inspector.js:4418 Request Log.enable…
Sergej.S
  • 43
  • 1
  • 5
3
votes
2 answers

In the Chrome Devtools, is there a faster way to open "inspect devices" other than using the mouse?

I would love it if there was a hotkey, or some other method I could use to avoid having to use the mouse to constantly re-open this window whenever I redeploy my app. Alternatively, is there a way of re-using an opened device inspector window that…
korona
  • 2,308
  • 1
  • 22
  • 37
3
votes
5 answers

How I can configure StatementInspector in Hibernate?

https://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/Interceptor.html says that onPrepareStatement(String sql) is Deprecated. Supply a StatementInspector instead, if you wish to inspect and alter SQL statements. But I am not clear how I…
gosachin1
  • 61
  • 1
  • 8
3
votes
1 answer

inspect module for python

I'm an artist that is new to python/coding in general, and also have trouble reading this doc. https://docs.python.org/2/library/inspect.html# I am trying to understand how to use the inspect module. This file is called TestClassA.py: import…
Rusher
  • 41
  • 1
  • 6
3
votes
1 answer

Chrome's remote debugging - inspect window closing on Ubuntu 15.04

I'm trying to open Inspect WebView in chrome DevTools, i can see my device and the opened WebView, but when i click on the inspect link, the DevTools window opens for a brief moment and autoclose immediately. Chrome version is 48.0.2564.116…
mike_t
  • 2,484
  • 2
  • 21
  • 39
3
votes
1 answer

How to get class name from bound method using inspect?

class MyClass: def my_method(self): print(get_context()) MyClass().my_method() I need get next line: MyClass::my_method sys._getframe(2).f_code.co_name gives me only "my_method". How to get also class name?
Artem Selivanov
  • 1,867
  • 1
  • 27
  • 45
3
votes
2 answers

I would like to have a custom inspect function for use with util.inspect in node.js to treat arrays specially

Given var a = {a:'a', b:'b', c:[1,2,3], d:{ d1:{ d2:{ d3:[1,2,3] }}}}; I would like to get the following output from console.log( util.inspect( a, {depth:null})); { a: 'a', b: 'b', c: Array[3], d: { d1: { d2: { d3: Array[3] } } } } I tried…
Jeff
  • 2,095
  • 25
  • 18
3
votes
2 answers

Most efficient way in Python to check if object attributes are assigned DataFrames?

I'm trying to build a list of names of all attributes in a class that are either pandas DataFrames or Series. The following works but seems slow since it goes through every attribute listed by dir() including special methods (the special methods…
pylang
  • 40,867
  • 14
  • 129
  • 121
3
votes
2 answers

Rails print (dump) variables

When debugging, I usually use puts some_variable.inspect to print (dump) the variable. However, I am tired of typing puts ...inspect every time. Is there a better way to print variables?
Trantor Liu
  • 8,770
  • 8
  • 44
  • 64
3
votes
1 answer

Eclipse lost shortcut for inspect while debugging ctrl+shift+i

I'm trying to restore a shortcut with no succcess. There were a shortcut to do inspect, by clicking CTRL+SHIFT+I. But just now i have no more available this feature, it seems to be disappeared. Any idea to restore it? Thanks!!
Billyjoker
  • 729
  • 1
  • 10
  • 31
3
votes
3 answers

'Inspect Element' in Chrome is showing LESS but Firefox is showing CSS

When I am tring to inspect an element of html in Chrome it's showing the LESS file whereas Firefox is showing CSS file. (I am using Bootstrap framework) How can I see the css reference in Chrome? Please see the attached screenshot below for what I…
saicode
  • 327
  • 1
  • 4
  • 12
3
votes
1 answer

Difference between "view source" and "inspect element" - mysterious unwanted tags are inserted

I understand that modern browsers interpret one's HTML code in a certain way, and the result is that what one sees in "inspect element" in Google Chrome, for example, is different than what one sees in "view source". Mysterious and tags…
cake
  • 658
  • 5
  • 13