<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nicola Verbeeck on Medium]]></title>
        <description><![CDATA[Stories by Nicola Verbeeck on Medium]]></description>
        <link>https://medium.com/@nicolaverbeeck?source=rss-1cf7d908e5da------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*KP365J4S35uS9lXC</url>
            <title>Stories by Nicola Verbeeck on Medium</title>
            <link>https://medium.com/@nicolaverbeeck?source=rss-1cf7d908e5da------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 08:05:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nicolaverbeeck/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Using the niddler IntelliJ plugin]]></title>
            <link>https://medium.com/@nicolaverbeeck/using-the-niddler-intellij-plugin-a171241c3a6b?source=rss-1cf7d908e5da------2</link>
            <guid isPermaLink="false">https://medium.com/p/a171241c3a6b</guid>
            <category><![CDATA[intellij]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Nicola Verbeeck]]></dc:creator>
            <pubDate>Thu, 07 May 2020 16:50:59 GMT</pubDate>
            <atom:updated>2020-05-07T16:50:59.075Z</atom:updated>
            <content:encoded><![CDATA[<p>For an introduction to niddler, please check the post Introducing Niddler</p><p>This post is a guide to the niddler plugin, for instructions on how to setup the libraries, go check out the Introducing Niddler post.</p><h4>Installing the niddler plugin</h4><p>The niddler plugin is available for free from the IntelliJ plugin marketplace. Simply go to Settings → Plugins → Search for niddler</p><h4>Features</h4><p>The plugin window currently has the following features:</p><ol><li>The list of requests/responses</li><li>The details about the selected item in area 1</li><li>The session starting/stopping toolbar</li><li>Display options and other actions for the current session</li><li>Filtering for the current session</li><li>Toolbar for creating additional session and debugging options</li><li>Status of the session</li></ol><figure><img alt="Screenshot of the niddler interface, annotated to include most important interaction areas" src="https://cdn-images-1.medium.com/max/1024/1*vT_q1j6OqUJgwTHPqb2CVQ.png" /><figcaption>Basic niddler interface</figcaption></figure><h4>Step 1 — Connect to a niddler server</h4><p>Use the play icon of the session toolbar to connect to a niddler server. This will bring up the connection dialog. The niddler libraries contain a discovery mechanism that allows the plugin to find active niddler sessions on attached devices. The plugin is capable of detecting sessions on your local device (localhost, including ios simulators), android devices connected via ADB and i-devices connected via USB or remote connections (anything libimobiledevice can find). The plugin tries to guess the location for adb and libimobiledevice binaries, if it can’t find them and you get warning messages in the connection window, please go to your IDE’s settings, search for niddler and update the paths there.<br>The stop action stops the connection with the current server, note that this does not wipe the locally stored data, this is kept in RAM until cleared via the trash action.<br>The debug action is described in more detail in &lt;Niddler Plugin Advanced, coming soon&gt;</p><p>If the plugin is not able to find the device or sessions on that device or you want to connect to a coworkers device that is not connected to your PC, you can choose to make a direct connection by entering the device IP and the port on which niddler is running. This port is setup by the library and can (in the case for the android library) be found in the notification on the target device.</p><figure><img alt="Screenshot of the niddler connection dialog" src="https://cdn-images-1.medium.com/max/820/1*SOZMf7jxqXSHqSDyDRAX2A.png" /><figcaption>Niddler connection dialog</figcaption></figure><p>To further aid you in finding the right process to connect to, the plugin can display custom icons to help you identify processes. By default the following 4 icons (names) are supported by the plugin: android, apple, dart, flutter. To use custom icons, place them in the .idea/niddler folder (square 20x20 or 40x40 @2x) with the name of file denoting the name of the icon specified in the library.</p><p>Check the documentation for your specific library for information on how to set this up for your app (<a href="https://github.com/icapps/niddler#session-icons">android</a> and <a href="https://github.com/Chimerapps/niddler_dart">dart/flutter</a>)</p><h4>Step 2 — Inspect requests/responses</h4><p>As soon as you are connected and your application is making requests (or has made requests that are available in the server memory buffer), you will now see these requests appear on the left hand side. The default view for this panel is ‘Timeline’, in this view, requests and responses are displayed in the order seen by the server (allowing for multi-threading to schedule multiple requests at the same time).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rRWvhVotfz3gIQindm-bkg.png" /><figcaption>Requests and responses in timeline view</figcaption></figure><p>In this view you can see the following information</p><ul><li><strong>Timestamp:</strong> request/response timestamp (as reported by the device)</li><li><strong>Direction indicator:</strong><br>- Up arrow is a request<br>- Down arrow a response<br>- Data returned from cache (eg http 304) and changed requests/responses get a special indicator</li><li><strong>Method: </strong>The method of the request. Can be any string that makes sense for your protocol. For HTTP this is one of the HTTP methods</li><li><strong>Request URI: </strong>If your requests all go to the same server, you can strip a part of the URI by right-clicking an item and selecting ‘Hide base urls’ from the context menu</li><li><strong>Status code:</strong> Response status code</li><li><strong>Body mime type: </strong>The plugin uses a best-effort way to determine the body mime type based on the content-type and/or based on the actual content</li></ul><p>When the server is serving requests from its internal memory cache, it is possible that for some requests/responses the corresponding response/request is no longer retained. In that case the information displayed will be reduced to what is known. This is also the case for requests that are still in-flight, for those there is for example no status code yet.</p><p><strong>Tip:</strong> pressing the ‘r’ key when an item is selected will try and select the corresponding request or response for the item</p><p>The right-click context menu of an item gives you access to a number of extra options:</p><ul><li><strong>Copy URL:</strong> If present, copy the request URL to clipboard</li><li><strong>Copy body:</strong> If present, copy the request/response body to clipboard<br>(Based on the data type this can be text, image, …)</li><li><strong>Export cUrl Request: </strong>Generate a cUrl snippet representing the request and copy it to clipboard</li><li><strong>Add request rewrite rule: </strong>Please refer to the &lt;Niddler Plugin Advanced&gt; topic</li><li><strong>Hide/show base urls:</strong> Allows you to hide/show part of the URLs for similar requests in the UI</li></ul><h4>Step 3 — Request/Response details</h4><p>When you have an item selected on the left side, the right side hows more detailed information about that item.</p><p>This information is divided into 2 tabs: details and body</p><p>In the <strong>details</strong> tab you get an overview of parameters associated with the request or response. This is usually split up into 3 blocks:</p><ul><li><strong>General: </strong>Contains generic information about the request or response such as timestamp, method, execution time, …</li><li><strong>Headers: </strong>Contains information about the headers sent as part of the request or in response from the server. Headers are marked with a <strong>*</strong> in front if they are headers added by a deeper layer running after niddler (eg: okHttp adds some headers in the network interceptor layer that are invisible to the application interceptor layer).</li><li><strong>Stacktrace: </strong>When the library has been configured to include request-site stack traces, these will be placed in this panel. If possible, these stack traces are clickable if their implementation can be found in the current project.</li></ul><figure><img alt="Screenshot of niddler plugin detail panel" src="https://cdn-images-1.medium.com/max/1024/1*Y3M_wb802sLQfWqgMeFhZA.png" /><figcaption>Detail panel</figcaption></figure><p><strong>Tip:</strong> Most items are not selectable but you can use right-click context menu to copy key and/or value</p><p>The <strong>body</strong> panel contains a representation of the request/response body if available. The exact representation options is determined by the body, eg:some data such as json has a structured representation, data such as images do not.</p><p>In the body panel, a maximum of 3 visualisation options are present:</p><ul><li><strong>Structured:</strong> For data which has a structured representation such as json/xml, a tree-like view of the data. Supports copying using regular copy shortcut or via right-click context menu</li><li><strong>Pretty:</strong> For data which has a pretty-formatted representation, this will be rendered here. Eg: pretty-formatted json or images</li><li><strong>Raw:</strong> The only option always present, a raw view of the data as sent by the server. For textual data this is a textview, for binary data that cannot be represented as text, this shows a simple hex viewer</li></ul><p>The panel also includes a save button that allows you to save the body to a file.</p><figure><img alt="Screenshot of structured json in tree-view" src="https://cdn-images-1.medium.com/max/1024/1*SQoFfHOaxqdHPCbkbCmC4Q.png" /><figcaption>Structured view — json</figcaption></figure><figure><img alt="Screenshot of pretty view json representation" src="https://cdn-images-1.medium.com/max/1024/1*mNMC46A39JGljCFb936fsg.png" /><figcaption>Pretty view — json</figcaption></figure><figure><img alt="Screenshot of pretty view showing image of a cat" src="https://cdn-images-1.medium.com/max/1024/1*bjk6Yja49qaFNBRfO-nlFg.png" /><figcaption>Pretty View — Image</figcaption></figure><figure><img alt="Screenshot of binary hex viewer" src="https://cdn-images-1.medium.com/max/1024/1*yjAuJwa7rZ-UJL5wlWT-qQ.png" /><figcaption>Binary hex viewer</figcaption></figure><h4>Session action panel</h4><p>The session action panel contains some actions related to the displaying/exporting of currently viewed data.</p><figure><img alt="Screenshot of session action panel actions" src="https://cdn-images-1.medium.com/max/74/1*B1ZulXCrhPHAs2PY9BSiKQ.png" /><figcaption>Session action panel</figcaption></figure><p>These actions are, from top to bottom:</p><ul><li><strong>Timeline:</strong> View data in timeline view (default)</li><li><strong>Linked:</strong> View data in linked view (WIP). In this view, requests and responses are shown linked together in a tree view. When the library is capable of determining that the actual network request is different from what the app has seen, it will also expose these requests here. Useful when inspecting 304s with okHttp as these are reported as normal 200s with data to the application layer</li><li><strong>Auto-scroll:</strong> Automatically scroll the view when new items are available</li><li><strong>Trash:</strong> Clear session RAM in the plugin. This does not clear the storage on the server, only what the plugin has seen. Reconnecting to the same server will retrieve all data stored on the server again</li><li><strong>Save:</strong> Export the current RAM data to the <a href="http://www.softwareishard.com/blog/har-12-spec/">HttpArchive v1.2 format</a> (.har) which can be viewed in your <a href="http://www.softwareishard.com/har/viewer/">browser</a> or using compatible tools such as <a href="https://www.charlesproxy.com/">Charles Proxy</a></li></ul><h4>Filtering</h4><p>On the right side of the window, an input field allows you to filter the current view based on URI matching. Only requests with a URL containing the value will be displayed in the data view.<br>Note that all data is still being saved to RAM, clearing the filter will show them again.</p><p><strong>Tip: </strong>Confused why there is no data showing even though you are connected and you are sure requests are being made? Check if you did not forget to clear the filter!</p><p>The <strong>save</strong> action can take this filter into account when exporting. If you have an active filter when triggering a save, the plugin will ask you if you wish to save the data with the filter applied, or all data.</p><h4>Other options</h4><p>On the far left action panel, two actions can be seem:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/56/1*35_aB-Ksd7mip4s4BhPyzA.png" /></figure><ul><li><strong>New session: </strong>Open a new tab to start another niddler session. Tabs are fully separate and keep their own data in memory</li><li><strong>Debug configuration: </strong>Configure rewrite rules for the current project. For more information see &lt;Niddler Plugin Advanced&gt;</li></ul><h4>Settings</h4><p>The niddler plugin comes with a number of configurable settings. These can be accessed from the IDE settings.</p><p><strong>Global settings: </strong>General niddler settings, not specific to the current project. These settings are used to configure the path to the different tools in use by the plugin eg: adb, libimobiledevice. A restart may be required after setting the paths.</p><p><strong>Per-project settings: </strong>The plugin has a feature where it can listen to when you start your application by using the IntelliJ run configurations and automatically connect to the niddler server of the newly started process. This can be enabled/disabled per-project. In addition to enabling/disabling this option, you can choose wether the plugin needs to create a new session tab to connect in or of it can re-use a session tab with a non-connected session.</p><p><strong>Note: </strong>Automatically connecting uses the log output of the application (eg logcat) to get connection information. In some cases, a crashing application can trigger the OS to restart the app, this will also cause the niddler server to automatically reconnect, potentially losing the previous session if the option has been configured in settings to re-use idle session tabs.</p><p><strong>Note 2: </strong>Since the plugin keeps the received items in ram, using automatic connections in combination with <strong>not</strong> re-using idle tabs, a large number of tabs can be open and adversely affect the memory utilisation of the IDE.</p><h3>Contributing/Issues</h3><p>Development of the plugin happens on github right <a href="https://github.com/Chimerapps/niddler-ui">here</a>. If you have feature requests, issues etc, please let me know!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a171241c3a6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing niddler]]></title>
            <link>https://medium.com/@nicolaverbeeck/introducing-niddler-98deeac9a6bd?source=rss-1cf7d908e5da------2</link>
            <guid isPermaLink="false">https://medium.com/p/98deeac9a6bd</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[mobile]]></category>
            <dc:creator><![CDATA[Nicola Verbeeck]]></dc:creator>
            <pubDate>Thu, 07 May 2020 16:48:39 GMT</pubDate>
            <atom:updated>2020-05-07T16:51:33.513Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introducing Niddler</h3><p>Most (mobile) applications we develop everyday will interact with other systems through a network. This can be done using various protocols and connection types, we use REST, websockets, mqtt, … And s̶o̶m̶e̶ ̶o̶f̶ a lot of those days we spent working on those applications, we are debugging these interactions with the server. <br>There are many options and existing solutions, each with their own pros and cons. Some examples include logging HTTP requests and responses to the console (using HttpLoggingInterceptor, for example) or using a proxy such as Charles or Fiddler between our device and server.<br>However, none of those existing tools ticked all of the boxes for us. We needed some thing more. Enter: <strong>Niddler</strong></p><figure><img alt="Screenshot of niddler plugin window showing requests and responses in timeline view with response details showing json" src="https://cdn-images-1.medium.com/max/1024/1*HLfGoFZKcFutu7YSA52Fjg.png" /><figcaption>Niddler Plugin</figcaption></figure><h3>Niddler: An integrated network interceptor (for the IntelliJ platform)</h3><p>Created to fill a desperate need, niddler is a combination of a library and an associated IntelliJ plugin.</p><h4>Features</h4><ul><li><strong>IDE integration</strong>: Integrated with (y)our favourite IDE: IntelliJ (and by extension Android Studio). Easily view, search, filter, export your network traces directly from your development environment, no need to switch to external tools</li><li><strong>Technology agnostic</strong>: The niddler protocol is not specifically geared towards the standard HTTP communication, in fact it was conceived for debugging high-traffic websocket applications</li><li><strong>Post-factum debugging</strong>: The niddler server keeps a (configurable) cache of the latest traffic in memory at all times. Seen something strange while not connected to your development machine? Just connect after-the-fact and inspect traffic from the past.</li><li><strong>Multiple platforms</strong>: After the initial library for native android projects (with convenience implementation built-in for okhttp), we also wrote a library specifically for dart/flutter!</li><li><strong>Call site tracing</strong>: Curious to see why a specific call was made? Enable call-site stack tracing and get instant insight what part of your code triggered the call. Even works across asynchronous gaps in dart</li><li><strong>No build-time magic: </strong>The runtime libraries are regular java/dart libraries that you include and configure. There is no need for special byte code manipulation or special build steps to make it work</li><li><strong>No SSL breaking required:</strong> Niddler works by exposing the requests and responses as seen by the application. This means SSL secured connections can keep executing normally without having to add certificates or weakening your connection stack</li><li><strong>Link-layer agnostic: </strong>Niddler connections work (most of the time) by proxying data over your USB connection, this means you can debug your network stack even if your test device is only connected over 4G, ethernet, …</li></ul><h3>Configuring the library</h3><p><strong>Quick-start android</strong></p><pre>// Include dependency in gradle<br>debugImplementation &#39;com.icapps.niddler:niddler:{latest version}&#39;<br>releaseImplementation &#39;com.icapps.niddler:niddler-noop:{latest version}&#39;</pre><pre>//Init niddler somewhere in the beginning of your application<br>//<a href="https://github.com/icapps/niddler#example-use-android">https://github.com/icapps/niddler#example-use-android</a><br>val niddler = AndroidNiddler.Builder()<br>    .setNiddlerInformation(AndroidNiddler.fromApplication(this))<br>    .setPort(0)<br>    ...  //Other config options. See github<br>    .build()</pre><pre>//Auto-start with activity start<br>niddler.attachToApplication(application)</pre><pre>val interceptor = NiddlerOkHttpInterceptor(niddler, &quot;Default&quot;)<br>val client = OkHttpClient.Builder()<br>    .addInterceptor(okHttpInterceptor)<br>    .build()</pre><p><strong>Quick-start dart/flutter</strong></p><pre>//Add niddler to you pubspec.yaml<br>dependencies:<br>  niddler_dart: ^0.8.0</pre><pre>//Update your main dart/flutter file<br>//More at <a href="https://github.com/Chimerapps/niddler_dart#usage">https://github.com/Chimerapps/niddler_dart#usage</a></pre><pre>import &#39;package:niddler_dart/niddler_dart.dart&#39;;<br>import &#39;package:stack_trace/stack_trace.dart&#39;;<br><br>Future&lt;void&gt; main() async {<br>  await Chain.capture(() async { <br>    final niddlerBuilder = NiddlerBuilder()<br>        ..bundleId = &#39;com.test.test&#39;<br>        ..serverInfo = NiddlerServerInfo(&#39;Some descriptive name&#39;, &#39;Some description&#39;, &#39;dart&#39;)<br>        ..includeStackTrace = true //Capture request stack traces. Wrap all content inside main with `Chain.capture`<br>        ..port = 0; //0 to have niddler pick it&#39;s own port. Automatic discovery will make this visible<br>  <br>      final niddler = niddlerBuilder.build();<br>      await niddler.start();<br>      niddler.install();<br>     <br>      //Make http requests ...    </pre><pre>      await niddler.stop(); //Optional<br>  });<br>}</pre><h3>IntelliJ plugin</h3><p>For a detailed description on how to use the plugin, please check out the ‘Niddler IntelliJ plugin’ post <a href="https://medium.com/@nicolaverbeeck/using-the-niddler-intellij-plugin-a171241c3a6b">here</a>.</p><p>You can install it from the IntelliJ plugin marketplace. After installation, a new tool window is available on the bottom of the screen. If you have a niddler server running on a connected device, simply press the ‘play’ icon in the niddler window and watch the magic happen!</p><figure><img alt="Screenshot of the connection dialog" src="https://cdn-images-1.medium.com/max/1010/1*vsKp1n2Bo6dHGGZVWjnTcg.png" /><figcaption>Connection magic</figcaption></figure><h3>Architectural overview</h3><figure><img alt="Diagram showing high-level architectural overview of niddler system" src="https://cdn-images-1.medium.com/max/801/1*C7Grcf0YuclSbwFI3j0sVA.png" /><figcaption>High-level niddler architecture diagram</figcaption></figure><h4>Connections</h4><p>Niddler is split up into two parts: a server library embedded into your application and an IntelliJ plugin. These systems communicate with each other using the so-called niddler protocol over a physical link.</p><p>The niddler protocol is an application level protocol that uses websockets as its communication mechanism. This means that the physical layer used by the system can be anything that supports basic TCP connections. Currently implemented in the plugin are a number of ways to establish such a connection, based on the device under test.</p><p>When connected to a mobile device using USB, the plugin will create a direct TCP connection by forwarding TCP connections over USB. This connection is established by using ADB forward or libimobiledevice’s iproxy utility. In both cases, creating this connection by using adb over wifi or being remotely connected to your apple tv for example, should also work™.</p><p>When you are not debugging a mobile device (or if you are using the ios simulator), the plugin is also capable of connecting to local processes using regular TCP sockets to localhost. In case the device you wish to connect to is on a different machine not currently connected to your development box, there is also the option to directly connect by entering the device’s IP directly.</p><h4>Discovery</h4><p>Because we don’t want to waste time by figuring out which niddler servers are running, on which device and which port they are using, the library and plugin work together to expose this information through a discovery mechanism.</p><p>This discovery mechanism works by create an additional TCP server socket in the library on a well-known port (6394) and exposing information about running processes on it.</p><p>The details are subject to a deeper dive &lt;coming soon&gt;, but the gist of it is: when you press connect in the plugin, you should see a list of connected devices and for each of these devices which niddler servers are running.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98deeac9a6bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>